Tic-tac-toe is a board game of two players, each player taking turn in marking the spaces in a 3 X 3 grid. There is a win, if a player succeeds in placing their three marks in a horizontal, or vertical or diagonal direction along the grid.
- Either of the player can chose a symbol "X" or "O"
- When a player marks a space on the grid, the second player is not allowed to mark on the same space.
- There is a win if a player marks a complete row, column or diagonal.
- There is a tie, if there is no space left on the grid, without any win, from both players.
- To run the program, have ruby installed on your machine,
- On your terminal e.g. git bash, navigate to root directory then bin folder \bin,
- Type
ruby main.rb
From the project root directory run
rspec
or
rspec --format doc
- lib/board.rb
- lib/player.rb
- bin/main.rb