Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tic Tac Toe: Fixes win check on the last turn
The fix adds a winning conditions check for the last turn. My first attempt to test/play the game happened to end in a win on the last turn, however the app showed "It is a tie!". In this commit, I removed the upper bound check (as the turn can not be bigger than 8, and we need to check a win in case it is 8), and moved the code to show "It is a tie!" to be displayed only if there is no winner and the turn is 8. After turn 8, b.finished will be true (if there is no winner, it will become true because it is turn 8; otherwise we have a winner, and b.finished will become true too).
- Loading branch information