- Original project specification at [The Odin Project] (https://www.theodinproject/lesseons/oop)
- The purpose of the project is to master object oriented programming with ruby.
- Project setup
- User interface
- Game logic
- Instruction for players
Tic Tac Toe is Cool Math Games: Xs and Os is a paper-and-pencil game for two players, X, O:
- Players take turns filing the spaces in 3X3 grid.
- The player who succeeds in placing three of their marks in the horizontal, vertical, or diagonal or wins the game.
the following example game is won by the first player, X:
Run bundle
within this lab's directory before getting started.
├── Gemfile
├── Gemfile.lock
├── README.md
├── bin
│ └── main.rb
├── lib
│ └── player.rb
└── spec
├── 01_tic_tac_toe_spec.rb
├── 02_play_spec.rb
├── 03_cli_spec.rb
└── spec_helper.rb
-
clone the repository from here : (https://github.com/sinework/ruby-tic-tac-toe.git)
-
Open your git bash and clone the repo.
-
go to the diroctory of the file and run ruby "main.rb" or "main"
-
Good job you are now playing Tic-Tac-Toe game. 👌🙌
- Player one enters the name (Names should not be the same and not a number)
- Player two does the same.
- Choose a position from 1-9 from the game board. (Already taken positions cannot be selected.)
- The player who filled first the consecutive row, column or diagonal will be a winner.
- If all the positions are filled equally, the game will be declared a draw.
- To cancel the game in the middle of it, hit CTRL + C on the keyboard.
👤 Amine
👤 Sinework
Contributions, issues and feature requests are welcome!
Give a ⭐️ if you like this project!
- Microverse
- GitHub
- Theodinproject.com