02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

Nov 30, 2014

Third Week of Programming: Back from vacation and Tic Tac Toe

Since I last week wrote about most of the assignments for this week, I'll talk about one assignment which took more time than the others. Making a game of Tic Tac Toe.

Tic Tac Toe is played on a 3x3 grid in which one player is represented by across and the other player is represented by a circle. The players take turns putting their symbol into the grid and if three of the same symbol align vertically, horizontally or diagonally then the represented played wins.

The assignment was to make Tic Tac Toe with classes.

Firstly I made a Board class. Since the board has a physical representation in the game. I made a function to draw the board which consist of asterisk (*) and underscores (_). They form boxes which becomes the game board.

[TO BE CONTINUED]

No comments:

Post a Comment