Skip to content

In this project we are building TicTacToe game at class level.

License

Notifications You must be signed in to change notification settings

kubilaycaglayan/tic-tac-toe-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hire-badge Twitter Follow

hire-badge Twitter Follow

TIC-TAC-TOE

This game is a virtual implementation of the classic tic-tac-toe game.

All public class methods tested with RSpec.

RULES FOR TIC-TAC-TOE

  1. The game is played on a grid that's 3 squares by 3 squares.

  2. You are X, your friend is O. Players take turns putting their marks in empty squares.

  3. The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner.

  4. 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.

  5. In this virtual implementation, you and your friend can place a mark by selecting from the numbers 1 to 9 when prompted. This is illustrated below:

| (1) | (2) | (3) |

| (4) | (5) | (6) |

| (7) | (8) | (9) |

  1. A winning position would like the image below at the end. As soon as someone gets three of their marks in a row, the game ends.

| O | X | O |

| X | X | X | --- Player 'X' wins with this row!

| O | O | O |

For a detailed explanation, please have a look at this guide.

Live Link

  • You can quickly test and play this game by using the live link below. Once the link is opened, pressing run on the top of the page will start the game. Demo Link Milestone-4

Built With

  • Ruby
  • RSpec

Getting Started

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

Prerequisites

  • Ruby installed on local machine: Please go to this link if you need to install ruby
  • RSpec

Usage

  • Fork/Clone this project to your local machine
  • Run in your terminal using:
  • Run rspec in the terminal of your root directory to run the described tests
  "ruby <location_of_repo>/bin/main.rb"

Authors

👤 Ikraam Ghoor

👤 Kubilay Caglayan

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page

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(or master if not available) branch of the original project for a review

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • The Odin project for the project plan

📝 License

This project is MIT licensed

About

In this project we are building TicTacToe game at class level.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Ruby 100.0%