Skip to content

mosesmuchemi/tic-tac-toe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe OOP (Object Oriented Programming)

Game description

Tic-tac-toe (American English), noughts and crosses (British English), or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. From Wikipedia for more details about Tic-Tac-Toe.

screenshot

Built with:

  • Ruby

Live Demo

  • You can use this link if and skip straight to playing instructions for those who are impatient. Then hit the run button. Live Demo Link

Getting Started

Playing Instructions

NOTE: for those on the live demo click run button otherwise for those using local environment continue with instructions below:

  • Open a terminal window and go to game folder (cd ../tic-tac-toe/)
  • Run the game, using command: bin/main

You will be presented with the following screen. Since this is a console based game, every move will be simulated by keyiing in data.

screenshot

  • Enter your player name, and let the other player enter their player name too
  • The game automatically assigns the first player the X token and the second player the O token
  • Follow the instructions on the user interface i.e enter the number of the grid where you would like to place your token i.e key a a number between 1 and 9.
  • Do not place your token on a grid that is already chosen by the other player
  • The first player to succeed in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

Authors

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

About

Tic Tac Toe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%