Giter Club home page Giter Club logo

tic_tac_toe_ruby's Introduction

TicTacToe

Screenshot

Screenshot

Built With

  • Ruby
  • Linters
  • OOP

Getting Started

First, ensure that you have ruby installed on your local machine. To get a local copy up and running follow these simple example steps.

Prerequisites

Ruby installed on your local machine. Code editor (like VSCode) Terminal or similar to execute the program.

Install

Download a copy of the TicTacToe repository

  1. Direct to the main branch of the repository
  2. Click on "Code"
  3. Select the option to clone. HTTPS or SSH
  4. Copy the link
  5. Direct yourself to the main folder where you wish to clone the repository
  6. Open the terminal in this path.
  7. In the terminal, place: git clone [repository HTTPS or SSH link] (Don't close the terminal)
  8. Note: The repository should now be cloned and present in your folder
  9. In the terminal, direct yourself to the Ruby-TicTacToe folder. You can use: cd Ruby-TicTacToe

Usage

  • To play the game, open the terminal and direct yourself to the main folder root of TicTacToe. (AS SHOWN ABOVE ON STEP 9)
  • Once you are in the main root file, to run the program, enter in the terminal the command: ruby bin/main.rb
  • Follow the game instructions

Instructions

Once the game has started

  1. The first player places their name
  2. The first player needs to select a symbol from X or O
  3. The second player needs to enter their name
  4. Symbol for the second player is assigned automatically
  5. Game starts - Makes player1 choose a section and place his symbol (1-9)
  6. If the number you entered is already taken, you will be forced to choose again.
  7. Player 2 will now select a space in the board to place the symbol (the same rules apply as step 6)
  8. Players need to obtain a winning combo using their symbol (CHECK BELOW FOR WINNING COMBOS)
  9. If none of the players can get a winning combo, the game will simply draw with no winners.
  10. The game will prompt you to play once again: press "ok". Or to end the game: press "no"
  11. Enjoy

Board:

|1| |2| |3|

|4| |5| |6|

|7| |8| |9|

Winning combos:

1

|X| |X| |X|

|4| |5| |6|

|7| |8| |9|

2

|1| |2| |3|

|X| |X| |X|

|7| |8| |9|

3

|1| |2| |3|

|4| |5| |6|

|X| |X| |X|

4

|X| |2| |3|

|X| |5| |6|

|X| |8| |9|

5

|1| |X| |3|

|4| |X| |6|

|7| |X| |9|

6

|1| |2| |X|

|4| |5| |X|

|7| |8| |X|

7

|1| |2| |X|

|4| |X| |6|

|X| |8| |9|

8

|X| |2| |3|

|4| |X| |6|

|7| |8| |X|

Authors

๐Ÿ‘ค Sergio Cortes Satizabal

๐Ÿ‘ค Ari Karim

๐Ÿค 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!

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

๐Ÿ“ License

This project is MIT licensed.

tic_tac_toe_ruby's People

Contributors

arikarim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.