-
Notifications
You must be signed in to change notification settings - Fork 0
TicTacToe.cs #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
TicTacToe.cs #9
Conversation
| return false; | ||
| // checking for Tie | ||
| bool tie = false; | ||
| if (board[0][0] != " " && board[0][1] != " " && board[0][2] != " " && board[1][0] != " " && board[1][1] != " " && board[1][2] != " " && board[2][0] != " " && board[2][1] != " " && board[2][2] != " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you do this with a loop?
| /* if cells are empty what happens, make sure empty does not count as win */ | ||
|
|
||
| bool WonHorizontally = false; | ||
| if (board[0][0] == board[0][1] && board[0][1] == board[0][2] && board[0][0] != " " && board[0][1] != " " && board[0][2] != " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you do this with a loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need to check that all 3 position in the first row not equal to " "?
| { | ||
| // your code goes here | ||
| board[row][column] = playerTurn; | ||
| // your code goes here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the position was already filled in?
No description provided.