Time To Code: Task V and VI
Let’s implement the final part of the game!
We'll cover the following...
We'll cover the following...
Finding the winner
Once the players start playing the game, it can end in a win for one player or a tie.
Remember: The win condition is three consecutive "X"s or "O"s horizontally, vertically, or diagonally.
We’ve already provided some code to check for the winner. Before we move to our task, let’s quickly go through the provided code:
-
Line 3: We check if the three consecutive marks are crosses (
x). If yes, we declare ...