This Project is about Building Tic-tac-toe game using OOP concept of Ruby. Tic-Tac-Toe game is paper-pen game which requires two players to play game Player1 can be 'X' and player2 can be 'O'. It uses 3X3 grids which has 9 moves for both players to complete the Game. Any one of the player can win the game if he/she has got all 'X' or 'O' in any one of the possible position i.e first Row, Middle Row, last Row, First Column, Middle Column, last column, left Diagonal and Right Diagonal. This project requires to complete the following milestones:
- OOP-Milestone: Setup
- OOP-Milestone: User interface
- OOP-Milestone: Game logic
- OOP-Milestone: instruction for player
- About the Project
- Live Demo
- Getting Started
- Contributing
- Show your support
- License
- Authors
- Acknowledgements
To get a local copy up and running follow these simple example steps.
-
If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.
-
Copy and paste the following code into the Terminal:
git clone https://github.com/IjayAbby/Tic-Tac-Toe.git
-
Press Enter.
-
Once the repository has been cloned, navigate inside the repository and type: bin/main This will run the game and you will be able to play it using the terminal.
-
Enjoy
Tic-Tac-Toe is a very popular game, which consists in making a sequence of three symbols in either a row, column or diagonal in a 3x3 board. To play the game follow the getting started steps mentioned above this file. After you done that, run the main file and follow these steps:
- The game displays the board with the a welcome note on top.
- You will be prompted as a first player to enter your preferred name.
- You will be prompted as a second player to enter your preferred name.
- You will be prompted to choose who should go first.
- You will be provided with the choices you can pick from that is, between 1 - 9.
- You will play in turns, in sequence till the board is full then it will announce the game results ie, draw or winner.
- If you want to play again you can say (Y) yes or entirely quit the game by choosing (N).
-
Boot up your terminal and punch in
gem install rspec
to install RSpec. Once that’s done, you can verify your version of RSpec withrspec --version
, which will output the current version of each of the packaged gems. Take a minute also to hitrspec --help
and look through the various options available. -
Finally, cd into a project directory that you wish to configure for use with RSpec and type
rspec --init
to initialize RSpec within the project. This will generate two files,.rspec
andspec/spec_helper.rb
-
To check whether your test are passing or failing, go to your terminal and type
rspec
.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.
👤 Ijay Abby
- Github: @IjayAbby
- Twitter: @Ijay_js
- LinkedIn: Abigael Nyangasi
👤 Divyesh Patel
- GitHub: @Div685
- Twitter: @div_685
- LinkedIn: Divyesh Patel