menu()
print "'i' to read instructions, 'p' to play, or 'q' to quit: " get choice if choice is 'i' instructions() else if choice is 'p' playGame() else return
print "Welcome to the Tic Tac Toe help menu. Playing a game is simple. " print "When you, the player, are prompted to make a move, enter a number " print "from 0 - 8. The board will look as follows:" print " 0 | 1 | 2 " print "-----------" print " 3 | 4 | 5 " print "-----------" print " 6 | 7 | 8 " print "If a square already has a piece in it, an X or O will be displayed." print "If you try to occupy a square that already has a piece in it, an " print "error message will be displayed and you will be prompted to make " print "another move." print "The object of the game is to have 3 of your pieces occupy 3 spaces " print "in a row. The first to do this wins the game. If neither player has " print "managed to occupy 3 spaces in a row horizontally, vertically, or " print "diagonally then a tie occurs."
board = new Board for i = 0 to 9 board[i] = "" return board
print “\n\t”, board[0], “|”, board[1], “|”, board[2] print “\t”, “——” print “\t”, board[3], “|”, board[4], “|”, board[5] print “\t”, “——” print “\t”, board[6], “|”, board[7], “|”, board[8], “\n”