Skip to content

Building a tic-tac-toe game on the command line(windows) / terminal(mac & linux) where two human players can play against each other and the board is displayed in between turns.

Notifications You must be signed in to change notification settings

Elbie-em/OOP-Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP-Tic-Tac-Toe-Game

Building a tic-tac-toe game on the command line(windows) / terminal(mac & linux) where two human players can play against each other and the board is displayed in between turns.

Full task description here

Game Instructions

The Tic Tac Toe game is played on a board with 9 fields. The first player place three pieces in column based, row based or diagonal order wins. Each player picks a symbol, X or O. In this case , player one gets to be X and Player two is O. Each player takes turns and first to place pieces as mentioned wins the game. If the board is full then it is a match draw.

How to Play

  • Begin by executing the file main inside the repositories /bin folder.

  • An instruction board is shown in order to specify the places on the board

    • 1 | 2 | 3
    • 4 | 5 | 6
    • 7 | 8 | 9
  • Follow the prompts

  • Enter players names and continue

  • Selections must correspond to the numbers shown above. If user types '1' when turn reached, their piece will be placed at position one on the board

    • X | _ | _
    • _ | _ | _
    • _ | _ | _

Note: The goal is to be the first to place pieces in the orders mentioned, below shows how player two wins

  • X | O | X

  • X | O | _

  • _ | O | X

  • The game prompts for a response of weather you wish to continue or not once there is a win or draw. The game exits if user wants to quit or viceversa if yes is selected

Built With

  • Ruby
  • VSCode
  • Terminal
  • Rubocop

Getting Started

The project was designed to test capalities of implementing Object Oriented Program using Ruby

  • Ruby Enviroment: if you do not have ruby installed visit this link to install

  • Terminal(Mac & Linux) or Command Prompt(Windows): run the main file located in the bin folder $ ruby main

Authors Hireable

👤 Elbie Moonga

👤 Rafael Nazario

🤝 Contributing

Contributions, issues are welcome!

About

Building a tic-tac-toe game on the command line(windows) / terminal(mac & linux) where two human players can play against each other and the board is displayed in between turns.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages