Skip to content

This application is a command line implementation of the classic Tic tac toe game.

Notifications You must be signed in to change notification settings

Maryjanee/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

This application is a command line implementation of the classic Tic tac toe game.

View Code Github Issues GitHub Pull Requests

Content

About   |    How to Play   |    Screenshot   |    Game Instructions   |    Built with   |    Live Demo   |    Author

About

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.

X wins this game

Screenshot

screenshot

screenshot

🔧 Built with

  • Ruby

Play Online

Installation

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.

Game Instructions

Once you run the game, follow the prompts and instructions inside the terminal.

  1. The game is played on the command line.

  2. You will be prompted to type each player's name.

  3. The first player will play with the 'x' tag, and the second player with the 'o' tag

  4. The game will prompt which player turn's it is.

  5. Each player should type a valid cell number and enter it to mark the board.

  6. A valid cell is one which has no player's tag and it is represented by a number between 1 and 9.

  7. After each turn, you will see the updated board with the selections of the players and the available cells left.

  8. A player can only mark an empty cell. If they choose an already marked cell they will be prompted again.

  9. 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!

  10. If all of the cells are filled with a symbol and no player matched 3 symbols, the game ends in a draw.

✒️ Authors

👤 Maryjane Akpagbue

👤 Ahmad Chata

Contributing

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

👍 Show your support

Give a ⭐️ if you like this project!

👏 Acknowledgements

  • Microverse
  • The Odin Project

About

This application is a command line implementation of the classic Tic tac toe game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages