Skip to content

eng-eng11/Ruby-Programming-PROJECT-OOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby-Programming-PROJECT-OOP

Project 1: Tic Tac Toe;

Tic-tac-toe Game Project

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.

Note

  • An Odin Project required to program in OOP (Object-Oriented Programming).

Rules of the Game

Tic-tac-toe (American English), noughts and crosses (British English), or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

The following example game is won by the first player, X:


Game demo

How to Run the Game

  1. git clone the repository and cd tic-tac-toe\ folder, type ruby ./bin/main.rb to start.

How to Play

  1. Start entering the name of player one and player two.
  2. Player one will start the first move as the command line prompt. (Enter number from (1 ~ 9)).
  3. A game board will be printed to show where the move has been made.
  4. Player two will be prompted to input his next move (Enter number from (1 ~ 9)).
  5. A game board will be printed to show where the move has been made.
  6. Game will continue until one of the players win or there is a draw.
  7. When the game is over, players will be asked if they want to play again.

Reference links

Project contributors:

About

Project 1: Tic Tac Toe and Project 2: Mastermind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages