Skip to content

Tic Tac Toe is a pencil and paper game played on a 3×3 grid wherein players take turns (one is X, and the other O) in marking down the spaces in the grid. The first player who can place his mark in a horizontal, vertical, or diagonal row wins the match.

License

Notifications You must be signed in to change notification settings

IjayAbby/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

img

issues Licence pull request

About the Project

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

Table of Contents

Built With

Live Demo

Live Demo Link

Getting Started

To get a local copy up and running follow these simple example steps.

  1. If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.

  2. Copy and paste the following code into the Terminal:

    git clone https://github.com/IjayAbby/Tic-Tac-Toe.git

  3. Press Enter.

  4. 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.

  5. Enjoy

Game Instructions

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).

Testing With Rspec.

  • Boot up your terminal and punch in gem install rspec to install RSpec. Once that’s done, you can verify your version of RSpec with rspec --version, which will output the current version of each of the packaged gems. Take a minute also to hit rspec --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 and spec/spec_helper.rb

  • To check whether your test are passing or failing, go to your terminal and type rspec.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

License

This project is MIT licensed.

Authors

👤 Ijay Abby

👤 Divyesh Patel

Acknowledgments

About

Tic Tac Toe is a pencil and paper game played on a 3×3 grid wherein players take turns (one is X, and the other O) in marking down the spaces in the grid. The first player who can place his mark in a horizontal, vertical, or diagonal row wins the match.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages