For this project we built 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. WE made use of different elements of Object Oriented programming(OOP) within the game - Class ,Instance variable, and Method.
-
Tic Tac Toe is board game played on a board with a 3 squared by 3 squared grid.
-
The players are assigned their own symbols to place on the board cells
-
Player 1 will be assigned the
X
symbol. -
Player 2 will be assigned the
O
symbol. -
Players take turn to place their symbols on the board.
-
The grid is numbered from 1 to 9.
-
You place the symbol by choosing the cell number.
-
The First Player to get 3 of her symbols in a row (up, down, across, or diagonally) wins the game.
-
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.
- Ruby
To get a local copy up and running follow these simple example steps.
- Text editor
- GitHub
- Git
- Ruby
Clone repository from github to your local drive by following these steps:
- Go to the main page of the repository
- Above the listed files, click the green Code button
- You can clone the repository using:
- HTTP:
https://github.com/tanzila-abedin/Project-3-TicTacToe
. - Open Terminal
- Change the current working directory to the location you want the cloned directory
- Type git clone and paste the HTTP link.
- Press Enter to create your local clone
- Install Atom or Microsoft Visual Studio text editor(preferred) to view the code on your local machine.
- Install Git.
- Open your terminal
- Navigate to project directory
- type 'git checkout game_logic' to navigate to correct branch
- 'cd bin' to enter the bin
- Run
ruby main.rb
in your terminal to play and press Enter. - Follow the instructions in the Tic Tac Toe Game Instructions section.
- Enjoy the game
👤 Tanzila
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
👤 Stephanie
- GitHub: @githubhandle
- LinkedIn: LinkedIn
This project is MIT licensed.