TicTacToe: Sample 2-player game (human vs. human)
This is a Tic Tac Toe program. Choose the type of game: (1) human o vs. human x (2) human o vs. dumb computer x -> 1 1 2 3 4 5 6 7 8 9 It's o's turn. Input the number of an empty square: (-1 to quit) 5 1 2 3 4 o 6 7 8 9 It's x's turn. Input the number of an empty square: (-1 to quit) 1 x 2 3 4 o 6 7 8 9 It's o's turn. Input the number of an empty square: (-1 to quit) 4 x 2 3 o o 6 7 8 9 It's x's turn. Input the number of an empty square: (-1 to quit) 2 x x 3 o o 6 7 8 9 It's o's turn. Input the number of an empty square: (-1 to quit) 6 x x 3 o o o 7 8 9 Player o is the winner.