This application is a command line implementation of the classic Tic tac toe game.
About | How to Play | Screenshot | Game Instructions | Built with | Live Demo | Author
Tic-tac-toe (American English), noughts and crosses (British English), is a game for two players, and each of the players are assigned tags(X and O) ,each player take turns marking the spaces in a 3×3 grid with their assigned tag. The player who succeeds in placing three of their tags in a horizontal, vertical, or diagonal row is the winner.
- Ruby
You need to have Ruby installed in your computer to run this file: https://www.theodinproject.com/courses/web-development-101/lessons/installing-ruby
You can download the project or clone the project git clone git@github.com:Maryjanee/Tic-Tac-Toe.git
You will need to execute the main.rb file located inside the bin folder. please follow the instructions here to make the script executable
Open the terminal and navigate to the folder containing the tic-tac-toe game. Once you are inside, your terminal should look like this: User/<folder>/tic-tac-toe/
. You can type bin/main.rb
to run the game.
Once you run the game, follow the prompts and instructions inside the terminal.
-
The game is played on the command line.
-
You will be prompted to type each player's name.
-
The first player will play with the 'x' tag, and the second player with the 'o' tag
-
The game will prompt which player turn's it is.
-
Each player should type a valid cell number and enter it to mark the board.
-
A valid cell is one which has no player's tag and it is represented by a number between 1 and 9.
-
After each turn, you will see the updated board with the selections of the players and the available cells left.
-
A player can only mark an empty cell. If they choose an already marked cell they will be prompted again.
-
The first player to match a succession of 3 of their assigned symbol (O's or X's) in a row, column or diagonal wins!
-
If all of the cells are filled with a symbol and no player matched 3 symbols, the game ends in a draw.
👤 Maryjane Akpagbue
- Github: Maryjanee
- Twitter: Maryjane Akpagbue
- Linkedin: Maryjane Akpagbue
👤 Ahmad Chata
- Github: ahmadchata
- Twitter: ahmadchata
- Linkedin: Ahmad Chata
- 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 .
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Microverse
- The Odin Project