Programming 11/12: Flash Assignment 6

For this assignment, you will create a simple two-player Tic-Tac-Toe game (PvP). Each player alternates turns, placing an X or an O marker on a 3 x 3 grid. The player with three markers in a row wins; the two players tie if a winner is not determined when grid is completely filled. A computer opponent is not necessary for this assignment.

[swf]http://mrkam.ca/wordpress/wp-content/uploads/TicTacToeCPU.swf, 550, 400[/swf]

Evaluation: The game is marked out of 10 based on the following criteria:

  • Markers can only be placed in blanks and alternate after each turn. (2 marks)
  • X can win vertically, horizontally, and diagonally. (2 marks)
  • O can win vertically, horizontally, and diagonally. (2 marks)
  • X and O can tie. (1 marks)
  • Wins and ties are displayed. (1 mark)
  • Game can be reset. (1 mark)
  • No more turns when game is over (either win or tie).