Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 999 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 999 Bytes

Tic-Tac-Toe: Ruby, Code Submission

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.

Instructions to run the game

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

Tests

This program uses the standard ruby/rspec directories for source and test files .

To run the tests:

  • cd into the ruby directory
  • run rspec