The purpose of this project is to consolidate the acquired knowledge of the Ruby programming language. For this, we decided to develop a Video Game development project called Tic Tac Toe, in order to learn the correct operation of Object Oriented Programming.
This web page was the third Ruby Programming Language Project of the Microverse curriculum. In this project, we learned the importance of Object Oriented Programming in programming languages and how Ruby can help us accomplish this task.
This project was created to study the importance of Object Oriented Programming and its application in Ruby.
Computer running Mac OS, Windows, or Linux Ubuntu. Ruby V.3.0.0...
Getting Started To get a local copy up and running follow these simple example steps:
- You need to clone or download as zip file the repository on your device.
- Unzip the repository or just clone it using git or github.
- Grab the main.rb file and open it on your favorite online code editor, for example repl.it.
- If you want to see the source code of the files located in my repository, you can do it through a code editor of your choice, I recommend using VSCode, first, you must install it by following these steps, then you must open the folder containing my repository in your local repository and open each of the files to see their content.
- If you have any questions or problems about how to run this project, you can leave me a comment in the issues section of this repository, I am more than willing to help you.
Run main.rb with Ruby V.3.0.0.
Linters errors
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 diagonal, horizontal, or vertical row is the winner
- This game will take place in your computer's terminal. In order to open the terminal you only need to search for 'terminal' in your computer or hit "Ctrl + `" or "Cmd + `" to open it.
- In the terminal, type
cd
to go to the game's folder where you cloned the Tic Tac Toe repository. For example: Desktop/User/tic-tac-toe/. You can also use the comandls
to see the files listed in the folder. - Now,
cd
intobin
folder by typyingcd bin
and executing the commandruby main.rb
in the terminal to start the game. Or, you can just typeruby bin/main.rb
without change tobin
directory. - Enjoy the game!
- Type the name for Player1, and it will be assigned the symbol 'X';
- Type the name for Player1, and it will be assigned the symbol 'O';
- Now the first player can select any cell in the range of (1-9) to put his/her mark (X in this case)
- Remember to insert a valid number (from 1 to 9) and don't repeat any number that is already taken by a symbol;
- The first player to complete three marks in a row, column, or diagonal line will be the winner.
👤 Author Aristides Jose Molina Pérez
- GitHub: @aristides1000
- Twitter: @aristides_1000
- LinkedIn: aristides jose molina perez
👤 Author Alexander Morales
- GitHub: @alexandermorales-dev
- Twitter: @Alexand81099721
- LinkedIn: AlexanderMorales
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is CC0-1.0 licensed.
- Ariel Camus CEO Microverse: For letting us start this journey.
- Google: For letting us find crucial information in order to create this project.