in your check() function, if you return "*", that means that no win was detected. What I would do is right before that, add a loop to check each spot in your matrix to see if it has been filled. If your code hasn't detected any wins, yet the matrix is full, that is a draw. in this case, return some other character, such as "=".
No comments:
Post a Comment