Challenge Tic-Tac-Toe

Creating the game board

You are going to create the game Tic-Tac-Toe, in which two players try to be the first to get three X's or three O's in a row. First, define a variable to keep track of whose turn it is. Second, you must define some constants to specify the size of the game board. Note that Tic-Tac-Toe is played on a 3 by 3 grid. Finally, define constants which specify the symbol for each player: an 'X' and an 'O'.

Var playerTurn = ----;
Var NUM_COLS = ----;
Var NUM_ROWS = ----;
Var SYMBOLS = [----, ----];