Project created by Alan Soto Valle and Mir Rawshan Ali
It was based on the project in the Ruby Module in Microverse
- ❌About Tic-Tac-Toe⭕
- 📐 About The Project
- 📋 Game Rules
- 📝 Game Instructions
- [Ruby
- 🖥️ Setup for starting Tic Tac Toe
- 💻 Run Tic-Tac-Toe
- 👥 Authors
- 🤝 Contributing
- ⭐ Show your support
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.
We created the game Tic Tac Toe using Ruby.
The game has a basic interface that runs in the terminal.
The goals of this project are:
- Practice with OOP (Object Oriented Programming) using Ruby.
- Learn how to create and structure a Ruby project.
- Learn to manage the files with correct usage to make code maintainable.
- Practice Git Flow and Github Flow creating branches for different features and for version control.
- This is part of the Odin project curriculum https://www.theodinproject.com/courses/ruby-programming/lessons/oop
- Two player game
- Player will have tokens or symbols (X or O)
- Players take turns choosing a cell of the board to mark their symbol.
- A player can only choose an empty cell if not will return an error until input is in an empty cell.
- The first player to complete a succession of 3 of their assigned symbol (O's or X's) in a row, column or diagonal wins!
- If all of the cells are filled with a symbol and no player matched 3 symbols, the game ends in a tie.
Once you run the game on the terminal, follow the instructions and prompts on screen.
- Both players should enter their preferable name or nickname
- Then it will display your tokens (X or O) and the turns will go accordingly to first and second player
- After the board is displayed the player should input their token accordingly to the empty slot (1 to 9).
- Ruby
To get a local copy up and running follow these simple example steps.
Computer running Mac OS, Windows, or Linux Ubuntu. Internet browser: Firefox, Google Chrome, Opera...
Have Ruby installed you can see this link for more detailed instructions Install Ruby
You MUST have Ruby installed in your system. If you don't have it installed you can go this page Install Ruby
After that install rspec by typing the command below:
gem install rspec
After installing ruby, you can download the repo or clone it (paste on the terminal) [email protected]:AlanSoto31/tic-tac-toe-game-ruby.git
You will need to execute the main file located inside the bin folder. If you are using Window, follow next step.
Open the terminal and navigate to the folder using cd path-to-folder
containing the tic-tac-toe game. Once you are inside, your terminal should look like this: User//oop-ruby/. You can type or paste this on terminal bin/main
to run the game.
Most Mac and some of Linux computers come with ruby installed, but still need to verify by typing in your terminal ruby --version
if not please go back to Installation section.
After verifying you have ruby installed and completing the Installation section, open the terminal navigate using cd path-to-folder
containing the tic-tac-toe game and run in the terminal bin/main
to run the game.
In order to test our project type the command below:
rspec --format documentation
👤 Alan Soto
- Github: @AlanSoto31
- Twitter: @Alan95081574
- Linkedin: linkedin Profile
👤Mir Rawshan Ali
- GitHub: @sumon0002009
- Twitter: @sumon0002009
- LinkedIn: Mir Rawshan Ali
👤Marcelo Araújo
- GitHub: @marcelomaidden
- Twitter: @marcelomaidden
- LinkedIn: Marcelo Fernandes de Araújo
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!