Skip to content

Created a tic tac toe game, that allowed users to play it using the terminal. Build using ruby and the code tested using Rubocop.

License

Notifications You must be signed in to change notification settings

danmainah/tic_tac_toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Project

A tic-tac-toe game on the command line where two human players can play against each other and the board is displayed in between turns, created with Ruby.

Built With

  • Ruby
  • Test: Rubocop

Getting Started

To get a local copy and play game

Prerequisites

  • For usage ensure you have ruby installed
  • Text editor
  • GitHub
  • Git

Clone this repository on to your local PC

  • Click on the Code green button
  • By the right end of the read-only input containing the repository link click the clipboard icon to copy the link
  • In your local PC, open your terminal in the folder you would like to clone the repository into
  • Clone the repository with the command: git clone (copied link); like so: git clone https://github.com/1v4n4/TicTacToe
  • After the clone, type in the command cd TicTacToe to access the directory on the terminal

About Tic tac toe

It is a game played by two players where they choose random numbers between 1 to 9. The first player takes X and the second player takes O. The first player who matches three spots in a horizontal, vertical, or diagonal row is the winner. When the spots on the board are all marked with no matches, then, the game ends in a draw.

Play the game

  • After clonning the project, run ./bin/main.rb at the root of the project in the terminal.
  • Enter names of two players, first player will play with X and the second with O.
  • Players will take turns marking their spots on the board.
  • The first player who matches three spots in a horizontal, vertical, or diagonal row. is the winner.
  • When the spots on the board are all marked with no matches, then, the game ends in a draw.

Author

👤 Daniel maina

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

About

Created a tic tac toe game, that allowed users to play it using the terminal. Build using ruby and the code tested using Rubocop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages