GithubHelp home page GithubHelp logo

muskanmahajan37 / tic_toc_toe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mahbubul14/tic_toc_toe

0.0 0.0 0.0 45 KB

This is a tic-tac-toe game that two players can play. The winner is the one who first aligns their marker on three subsequent cells (horizontally, vertically, or diagonally). After cells are exhausted, and there is no winner it is a tie.

Ruby 100.00%

tic_toc_toe's Introduction

Tic Tac Toe Project

A tic-tac-toe game on the command line where two human players can play against each other and the board is displayed in between turns, created with Ruby.

Built With

  • Ruby

Getting Started

To get a local copy up and running follow these simple example steps:

Prerequisites

  • For usage ensure you have ruby installed

Install

  • Ruby
  • Code-editor

About Tic tac toe

It is a game played by two players where they choose random numbers between 1 to 9. The first player takes X and the second player takes O. The first player who matches three spots in a horizontal, vertical, or diagonal row is the winner. When the spots on the board are all marked with no matches, then, the game ends in a draw.

How to play the game

  • After clonning the project in your local machine, run ruby main at the root of the project in the terminal.
  • Enter names of two players
  • Players will take turns marking their spots on the board.

Game rules

  • Player 1 plays with "x"
  • Player 2 plays with "0"
  • The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner!
  • When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends in a tie.

Authors

๐Ÿ‘ค Mahbub Alam

๐Ÿ‘ค Oni Olajumoke Priscilla

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

tic_toc_toe's People

Contributors

mahbubul14 avatar prolajumokeoni 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.