adamclasic / tic-toc-toe

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

Home Page:https://repl.it/@AlexandruBangau/tic-toc-toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Product Name Screen Shot

This is the third project of the Microverse Ruby Module

This is also the first project of the Odin project curriculum

Installation

To play this game you need to:

  • have ruby installed in your computer
  • download or clone this repo:
    • Clone with SSH:
      git@github.com: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

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  
      

Built With

This project was built using these technologies.

  • Ruby
  • Rubocop
  • VsCode

Live version

You can see it working here

Contributors

👤 Jaspreet Singh

👤 Alexandru Bangau

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.

https://repl.it/@AlexandruBangau/tic-toc-toe

License:MIT License


Languages

Language:Ruby 100.0%