Git Product home page Git Product logo

tic-tac-toe-game's Introduction

tic-tac-toe-game

This is the implementation of the popular TIC-TAC-TOE Game created using the Ruby programming Language

The first milestone is to create the necessary files and folders and make the file executable

Tic Tac Toe - Ruby OOP Game Rules

  • Each player is going to choose a number out of 9 positions.
  • First player should enter his name and press enter.
  • Second player should enter his name and press enter.
  • First player should enter his symbol [X or O] and press enter.
  • To choose a position you have to type the corresponding number and press enter.
  • The game will check if the chosen number is valid or not valid.
  • If it's not valid (i.e already taken number or not of the game positions - from 1 to 9 ) it will ask for another input.
  • If it's valid it will display the board with the chosen position replaced by the symbol of the player [X, O].
  • Then it will ask the next player to take turn.
  • It will repeate the same for the second player.
  • The game contiues till it reaches either winning or draw conditions.

Winning conditions We have 8 winning conditions...

  • First three, to have occupied a full row with the same symbol [X, O]
  • Second three, to have occupied a column with same symbol [X, O]
  • Third two, to have occupied a full diagonal with same symbol [X, O]

Draw condition

  • If 9 movements achieved with no winning then the game is a draw.

Built With:

  • Ruby
  • VS Code
  • Ubuntu
  • Rubocop linter

Getting Started

To get your own copy of our project simply clone the repository to your local machine.

Step 1: Type the following command into a git shell

git clone https://github.com/charlyeneh/tic-tac-toe-game

Step 2: Direct a terminal into the cloned repository directory

cd tic-tac-toe-game

Step 3: Run the program from command line

Step 4: Run main.rb from your terminal to display "Hello World!".

Authors

๐Ÿ‘ค German Cobian

๐Ÿ‘ค Eneh Charles Chukwunweike

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a โญ๏ธ if you like this project!

๐Ÿ“ License

MIT License

Copyright (c) 2021 German Cobian and Eneh Charles Chukwunweike

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

tic-tac-toe-game's People

Contributors

charlyeneh avatar german-cobian avatar

Stargazers

 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.