Skip to content

This is a tic-tac-toe game that two players can play. The winner is the one who first aligns their marker on three subsequent cells (horizontally, vertically, or diagonally). After cells are exhausted, and there is no winner it is a tie.

Notifications You must be signed in to change notification settings

mahbubul14/tic_toc_toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 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

Getting Started

To get a local copy up and running follow these simple example steps:

Prerequisites

  • For usage ensure you have ruby installed

Install

  • Ruby
  • Code-editor

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.

How to play the game

  • After clonning the project in your local machine, run ruby main at the root of the project in the terminal.
  • Enter names of two players
  • Players will take turns marking their spots on the board.

Game rules

  • Player 1 plays with "x"
  • Player 2 plays with "0"
  • The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner!
  • When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends in a tie.

Authors

👤 Mahbub Alam

👤 Oni Olajumoke Priscilla

🤝 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!

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration

About

This is a tic-tac-toe game that two players can play. The winner is the one who first aligns their marker on three subsequent cells (horizontally, vertically, or diagonally). After cells are exhausted, and there is no winner it is a tie.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages