/tic-tac-toe-ruby

a tic tac toe game project built with ruby

Primary LanguageRuby

Tic-Tac-Toe

About the Project

In this project we built a tic-tac-toe game. The main goal is to practice object oriented programming(OOP).

This game is played on a 3x3 grid, where two players take turns claiming cells on the grid using their symbol ‘x’ for the first player and an ‘o’ for the second one in an attempt to be the first player to mark three cells together, they can be in the same row, column or in diagonal, the first who archives it, wins!.

Milestones for this project: First Milestone: Project Setup. Second Milestone: User interface. Third Milestone: Game logic. Fourth Milestone: Final touches and instructions for the players.

📺 Live Demo

TIC TAC TOE

Getting Started

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

If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.

Copy and paste the following code into the Terminal:

git clone https://github.com/rayking12/tic-tac-toe-ruby

Press Enter.

Once the repository has been cloned, navigate inside the repository and type: bin/main.rb This will run the game and you will be able to play it using the terminal.

Enjoy the game!

Game Instructions

Tic-Tac-Toe is a very popular game, which consists in making a sequence of three symbols in either a row, column or diagonal in a 3x3 board.

To play the game follow the getting started steps mentioned before. After you have done that, run the "main" file and follow these steps:

First you need to introduce player one name.

Then you need to introduce player two name.

The game will display the board.

Player one choose a position in the board from 1 to 9 which is not occupied.

Player two choose a position in the board from 1 to 9 which is not occupied.

You will have turns, in sequence until there is a winner or the board is full which would result in a draw.

If you want to play again you can type bin/main.rb again and the game will reset.

Built With

  • Ruby
  • Rubocop
  • VS code

Contributing

Contributions, issues and feature requests are welcome! Start by:

  • Forking the project
  • Cloning the project to your local machine
  • cd into the project directory
  • Run git checkout -b your-branch-name
  • Make your contributions
  • Push your branch up to your forked repository
  • Open a Pull Request with a detailed description to the development branch of the original project for a review

Show your support

Give a ⭐️ if you like this project!

Authors Elisha kyakopo

Authors

👤 Elisha Kyakopo Github: @elisha2kyakopo1

Twitter: @elisha

Linkedin: Elisha kyakopo

👤 Ray King

GitHub: @githubhandle Twitter: @twitterhandle LinkedIn: LinkedIn