Skip to content

simplysparsh/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages