This is a simple Tic-Tac-Toe game made with Ruby. It has two game modes: single player and two player.
The single player mode lets you play with the computer and the computer uses minimax algorithm to play perfect moves. Therefore, it's impossible to beat the computer. Although, minimax does not guarantee a victory, therefore, if the user plays a perfect game, then the game will be a draw.
The two player mode let's you play the game with a friend.Therefore, the program gives you an interface to play although the players would be two different users and no artificial intelligence would be involved.
To run the game, simply clone the repo or download it to your computer.
cd
into the ruby
directory through the command line and run ruby lib/run.rb
This program uses the standard ruby/rspec directories for source and test files .
To run the tests:
cd
into theruby
directory- run
rspec