Computer Studies 10: AppInventor Assignment 3 – Tic-Tap-Toe

For this assignment, you will create a Tic-Tac-Toe game against a computer opponent. Players X and O alternate turns and whichever player succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is deemed the winner. If neither player wins, then the game ends in a draw.

In your game, random chance will determine whether the human player or the computer will go first. The computer’s choice is based on the following conditions:

  1. Computer will take the win if it can on its turn.
  2. Computer will block the human opponent on its turn to avoid a loss if it cannot win.
  3. Computer will place in any random available space if it cannot win and if it does not need to block.

Note: It is possible to program a computer opponent such that it is impossible to beat (i.e. the computer will win or tie any game). This is not a required implementation.

Evaluation (10 marks):

  • Basic Criteria: Meet all the conditions (6 marks)
  • Gameplay: Add any additions to improve gameplay (e.g. sound effects, improved graphics, reset button, etc.) (4 marks)