TIC-TAC-TOE 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 is the winner. This project creates a software based replacement for the paper-and-pencil game.
- Ruby
- Rubocop
- The code should demonstrate Object Oriented Design
- The workflow used should be Git flow and 4 feature branches need to be created
- The game should validate user input and handle winning, draw(tie) behaviors
- Clone the project in to your computer using
git clone https://github.com/DejazmachMolla/tic-tac-toe.git
cd
into thetic-tac-toe
folderrun
main.rb file by typingbin/main.rb
on the command prompt
- Player 1 and player 2 will be asked for their name
- A playing board will be presented as shown in the following screenshot
- Players will choose numbers between 1 and 9 that are not already chosen
- The two players will choose numbers alternatively and the number chosen will be replaced by an X or O symbol as shown below
- The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row will win
- If winning doesn't happen, a draw(tie) will happen in the end
- The player that won will be congratulated or the draw of the game will be informed for the players
- The players will be asked to continue or not with another game
- The game will be resetted if the players would like to continue or exited if they are done playing
👤 Dejazmach Molla
- Github: @DejazmachMolla
- Twitter: @DJATSS
- Linkedin: Dejazmach Molla
Give a ⭐️ if you like this project!
- Microverse