Coder Social home page Coder Social logo

tic-tac-toe-game's Introduction

Tic tac toe game [Collaborative Project]

The game has two players. Each Player should have a unique name. The game is a table that has values from one (1) to nine (9). The first player's move is converted to 'X' and the second player's move is converted to '0'. The player should not pick a number that has already been converted to either 'X' or '0'. If they do, they get an error message and a prompt to enter another value.

Win Scenarios

The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row, as shown in the images below, is the winner.


diagonal win

horizontal win

vertical win

When all the nine (9) squares are marked the game is over. If no player has three marks in a row, the game ends in a tie


draw game

Restart game

You can only restart a game after a win or when the game ends in a tie. When the game is over, you will get options to either restart or end the game between the current players.

Built With

Ruby

Live Demo

Live Demo Link

Author 1

Rose Wanjohi

Author 2

Odong Sunday

๐Ÿค Contributing

Contributions, issues and feature requests are welcome! Start by:

  • Forking the project
  • Cloning the project to your local machine
  • cd into the project directory
  • Run git checkout -b your-branch-name
  • Make your contributions
  • Push your branch up to your forked repository
  • Open a Pull Request with a detailed description to the development branch of the original project for a review

Show your support

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

tic-tac-toe-game's People

Contributors

blackpintz avatar odongalican avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

odongalican

tic-tac-toe-game's Issues

27-04-2020 | Team 104 The Fornax

Great Job on considering all the possible moves/error a user could make while giving input to the code.

Suggestions:

  1. Please use the print method only in the main.rb file.
  2. Use more than one class for the logic.

Overall good going, keep up the great work :)

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.