Time for action – finish creating the game

Let us finish the creation of our game by creating an opening screen. We will then add some checks to stop players from selecting squares more than once. Follow that with a check to see if anyone won and finally display a game over screen. With that, the game will be ready for us to make it look great.

Let's perform the following steps for finishing our game:

  1. We will do all this by first creating another script like our SquareState script. Create the new GameState script and clear out the default contents. Add the following code snippet and we will have the values needed to track the current state of our game:
    public enum GameState {
      Opening,
      MultiPlayer,
      GameOver
    }
  2. We now need to update our TicTacToeControl ...

Get Unity Android Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.