/tic-tac-toe

Learning the concept of OOP using the TicTacToe game

Primary LanguageRuby

RUBY PROJECT N°3 : TIC TAC TOE GAME

This project is about learning the concept of OOP using the TicTacToe game.

Rules of the Game

You probably already know how to play Tic-Tac-Toe. It's a really simple game, right? That's what most people think. But if you really wrap your brain around it, you'll discover that Tic-Tac-Toe isn't quite as simple as you think!

Tic-Tac -Toe (along with a lot of other games) involves looking ahead and trying to figure out what the person playing against you might do next.

Simply follow the instructions below to play the game in case you are not familiar with the rules already

  • The game is played on a grid that's 3 squares by 3 squares.
  • You are 'X' while your friend is 'O' (in the context of this game). Players take turns putting their tokens in empty squares.
  • The instruction in this game is to choose a valid integer between 1 and 9 to select one of the 9 positions on the board.
  • The first player to get 3 of the tokens 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.

Built With

Ruby

Visual code

Live Demo

Live Demo Link

Prerequisites

Ruby,Text editor,Github profile and Git.

Getting started

Before getting started make sure that ruby is installed.

  • Start by cloning this repository to your local machine :
git clone git@github.com:oracleot/tic-tac-toe.git
  • Access the cloned repoository :
cd tic-tac-toe
  • Run this command :
bin/main

Test

  1. Open a terminal
  2. Run 'gem install rspec'
  3. Run 'cd tic-tac-toe'
  4. Run rspec --init’ to install rspec in directory

Run

  1. Run 'rspec' in the terminal
  2. In the terminal, you should see if the tests pass or fail. screenshot

Authors

👤 Khalil Hamdi

👤 Damilola Oduronbi

👤 Ntwali Heritier

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

📝 License

This project is a collaboration project of microverse students. All rights are reserved for Khalil and Damilola.