Skip to content

Customized version of the tic-tac-toe game. The main goal was to put into practice the main concepts of Object Oriented Programming.

License

Notifications You must be signed in to change notification settings

rammazzoti2000/tic-toc-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues Run on Repl.it


Logo

Tic Tac Toe

This project is part of the Microverse curriculum in Ruby module!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

This is the Microverse Tic-Tac-Toe project. In this project users can play game on the command line where two human players can play against each other and the board is displayed in between turns

Product Name Screen Shot

Built With

This project was built using these technologies.

  • Ruby
  • Rubocop
  • VsCode

Usage

To play this game you need to:

  • have ruby installed in your computer
  • download or clone this repo:
    • Clone with SSH:
      [email protected]:rammazzoti2000/tic-toc-toe.git
    
    • Clone with HTTPS
      https://github.com/rammazzoti2000/tic-toc-toe.git
    
  • and execute bin/main.rb file using your terminal

Automated Test

To run the test you need to cd into the tic-tac-toe diretory and run:

rspec spec/

Game Rules

  • This is a customized version of the original tic-tac-toe game. Tha basic rules remain unchanged, the tokens to play with have changed instead.

  • The game is played on a 3 by 3 grid

    1  |   2   |   3    
  ----------------------
    4  |   5   |   6    
  ----------------------
    7  |   8   |   9    
  • The tokens you will play with in this game version will be "rum" and "vodka". While the first player will have the option to choose from the given tokens, the second player will have the token automatically assigned.
  • Each player will take turns putting their assigned token in empty squares.
      Player 1 turn - "rum"
    
          rum  |   2   |   3  
        ----------------------
           4   |   5   |   6  
        ----------------------
           7   |   8   |   9  
    
      Player 2 turn - "vodka"
    
         rum  |   2   |   3  
        ----------------------
           4  |   5   |   6  
        ----------------------
        vodka |   8   |   9  
    
    • The first player to get 3 tokens in a row (up, down, across, or diagonally) wins.
        Winning combinations (W is either "rum" or "vodka").
    
          W | W | W    1 | 2 | 3     1 | 2 | 3     W | 2 | 3     1 | W | 3     1 | 2 | W     W | 2 | 3     1 | 2 | W 
         -----------  -----------   -----------  -----------    -----------   -----------   -----------   -----------
          4 | 5 | 6    W | W | W     4 | 5 | 6     W | 5 | 6     4 | W | 6     4 | 5 | W     4 | W | 6     4 | W | 6 
         -----------  -----------   -----------  -----------    -----------   -----------   -----------   -----------
          7 | 8 | 9    7 | 8 | 9     W | W | W     W | 8 | 9     7 | W | 9     7 | 8 | W     7 | 8 | W     W | 8 | 9 
    
    • When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends and nobody wins.

          rum  | vodka |  rum  
        ----------------------
          rum  | vodka | vodka 
        ----------------------
         vodka |  rum  |  rum  
      

Live version

You can see it working here

Contributors

👤 Jaspreet Singh

👤 Alexandru Bangau

🤝 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!

Acknowledgements

📝 License

This project is MIT licensed.

About

Customized version of the tic-tac-toe game. The main goal was to put into practice the main concepts of Object Oriented Programming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages