Skip to content

uche-inyama/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

What is Tic-tac-toe?

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.

Rules of the game:

  • 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.

Instructions to run the program

  • 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

Running the tests

From the project root directory run

rspec

or

rspec --format doc

Dependencies

  • lib/board.rb
  • lib/player.rb

main file

  • bin/main.rb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages