Skip to content

This is a tic tac toe two-player game built with ruby programming language and RSpec unit-testing. The users choose X or O roles and select numbers from 1 to 9 trying to format a win pattern.

Notifications You must be signed in to change notification settings

MahmoudBakr23/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game Project

Two players Tic Tac Toe game.

To start

  • Click the green button "Run"
  • Insert player one's name
  • Insert player two's name
  • Player one is X
  • Player two is O

Roles

  • Player one starts by selecting a valid number from 1 to 9 to place his mark instead of the selected number
  • Player two selects after. Trying to prevent player one to place his marks in a pattern

To win

  • The player has to place his mark in 3 slots side by side in the following patters:

  • (1) If any row

  • X X X

  • 4 5 6

  • 7 8 9

  • (2) If any column

  • X 2 3

  • X 5 6

  • X 8 9

  • (3) If any diagonal

  • X 2 3

  • 4 X 6

  • 7 8 X

  • The same thing applies to player two (O)

Draw state

  • The game draw if the two players marked the 9 slots in the board without one of them completes one of the previous patterns.

Built With

  • Ruby

Live Demo

Live Demo Link

Getting Started

To get a local copy of the repository please run the following commands on your terminal:

$ git clone https://github.com/MahmoudBakr23/Tic-Tac-Toe.git

$ cd Tic-Tac-Toe

Authors

👤 Mahmoud

👤 Muhammad

👤 Mugirase Emmanuel

�� Contributing

Contributions, issues and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • The Odin Project

About

This is a tic tac toe two-player game built with ruby programming language and RSpec unit-testing. The users choose X or O roles and select numbers from 1 to 9 trying to format a win pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages