Play Tic-Tac-Toe with the computer!
How to play
ruby tic_tac_toe_game_play.rb
And just follow instruction on the screen.
Sample Play
$ ruby tic_tac_toe_game_play.rb
Welcome to a Tic-Tac-Toe Game!
You are playing against the computer. Try to win.
CPU marker is X
Your marker is O
| A | B | C
1 | . | . | .
2 | . | . | .
3 | . | . | .
Your Next Move (for example A1 or C3): B2
CPU put his/her marker on A1
| A | B | C
1 | X | . | .
2 | . | O | .
3 | . | . | .
Your Next Move (for example A1 or C3): C3
CPU put his/her marker on A3
| A | B | C
1 | X | . | .
2 | . | O | .
3 | X | . | O
Your Next Move (for example A1 or C3): B3
CPU put his/her marker on A2
| A | B | C
1 | X | . | .
2 | X | O | .
3 | X | O | O
Sorry. You Lost!
Would you like to play again? (Y or N): Y
Welcome to a Tic-Tac-Toe Game!
You are playing against the computer. Try to win.
CPU marker is X
Your marker is O
| A | B | C
1 | . | . | .
2 | . | . | .
3 | . | . | .
Your Next Move (for example A1 or C3): B2
CPU put his/her marker on A1
| A | B | C
1 | X | . | .
2 | . | O | .
3 | . | . | .
Your Next Move (for example A1 or C3): C3
CPU put his/her marker on A3
| A | B | C
1 | X | . | .
2 | . | O | .
3 | X | . | O
Your Next Move (for example A1 or C3): A2
CPU put his/her marker on C2
| A | B | C
1 | X | . | .
2 | O | O | X
3 | X | . | O
Your Next Move (for example A1 or C3): B1
CPU put his/her marker on B3
| A | B | C
1 | X | O | .
2 | O | O | X
3 | X | X | O
Your Next Move (for example A1 or C3): C1
Awwwww. No one won! Game is tied!
Would you like to play again? (Y or N):