Skip to content

A terminal-based tic tac toe game. Players can input their names while playing. Also, players can start a new game after completing a game. Built with Ruby.

Notifications You must be signed in to change notification settings

ershadul1/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

In this project we created a Tic Tac Toe game using OOP concepts. We used Ruby to write the game.

Status Github Issues GitHub2 Pull Requests

What is Tic Tac Toe

Tic-tac-toe, 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 is the winner.

In order to win the game, a player must place three of their marks in a horizontal, vertical, or diagonal row. Players soon discover that the best play from both parties leads to a draw. Hence, tic-tac-toe is most often played by young children, who often have not yet discovered the optimal strategy.

How to play this game?

Open the live demo link. Then press the run button on replt.it, as shown in the image below:-

screenshot

Input name of two players

screenshot

Make your move. You have to input values between 1 and 9

screenshot

After you have inputted the value, you will see 'X'(Player One) or 'O'(Player Two) in place of your given number. Example given below.

screenshot

If any player wins you will see this message

screenshot

If the game has drawn, you will see this message

screenshot

Requirements

  • RUBY

Live Demo

Live Demo Link

Getting Started

To get a local copy of the repository please run the following commands on your terminal:

  • navigate to your desired directory in your local machine
  • clone the repo : git clone git@github.com:ershadul1/Tic-Tac-Toe.git
  • cd into above cloned directory : cd Tic-Tac-Toe
  • Now you can do whatever you like to improve the game
  • To play the game run this command bin/main.rb
  • you can use your test codes to test the methods
  • add your preferrred test cases in spec folder

Authors

👤 Rayhan

👤 Razika

Contributing

  • To contribute to this project:
  • Fork this repository & clone locally.
  • Create an upstream remote and sync your local copy.
  • create a new branch.
  • Push your code to your origin repository.
  • Create a new Pull Request .

Show your support

Give a ⭐️ if you like this project! ​

Acknowledgments

  • Microverse
  • The Odin Project

About

A terminal-based tic tac toe game. Players can input their names while playing. Also, players can start a new game after completing a game. Built with Ruby.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages