Code Monkey home page Code Monkey logo

tic-tac-toe-game's Introduction

Tic-Tac-Toe-game

Project: OOP by Microverse [Collaborative Project] (created with Saidov Sayyod and Hermela Fikre) Tic tac toe game

Instructions and Game rules

Instructions

Tic-tac-toe, noughts and crosses, or Xs and Os is a game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.

Instructions and Game rules

Instructions

Tic-tac-toe, noughts and crosses, or Xs and Os is a game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.

Rules

First, you have to draw the board, which is made up of a 3 x 3 grid of squares. This means it has three rows of three squares. The first player goes with "X", you can allow the first player to decide whether he wants to go with "X"s or "O"s. These symbols will be placed on the board, in the attempt to have three of them in a row. After the first player goes, then the second player should put down his symbol, which will be different from the symbol of the first player. Keep alternating moves until one of the players has drawn a row of three symbols or until no one can win. The first player to draw three of his or her symbols in a row, whether it is horizontal, vertical, or diagonal, has won tic-tac-toe.

Built With

Ruby 2.7.1

Getting Started

Prerequisites

Ruby installed on local machine
Text editor (preferably: VSCode, Atom, Sublime)

Starting the game

  1. If you have installed Ruby on your machine: Clone the project into your local machine using git clone command or download the zip file. Go into the project directory using cd directory name command. Open your terminal and type bin/main.rb command. Enter players' names, select the letters which players play with. In displayed border choose the cells by numbers between 1 and 9 to paste your select ('X' or 'O')
  2. If you have not installed Ruby, please, install Ruby and repeat step 1.

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

Please feel free to contribute to any of these!

Feel free to check the issues page.

Authors

👨‍💻 Hermela Fikre

👨‍💻 Sayyod Saidov

Attributions and Credit

Microverse curriculum and The Odin Project for the project guidelines.

Show your support!

Give a 🌟 if you like this project! 😊

📝 Copyright

Enjoy!

tic-tac-toe-game's People

Contributors

mrsayyod avatar hermela-fikre avatar

Stargazers

Sanjar avatar

Watchers

 avatar

tic-tac-toe-game's Issues

12-05-2020 Team-104 The Fornax

Great job Team!!!!! Keep Up the great work.
Just a few suggestions.

  • Please consider adding a return value to the current_player method. it could be boolean values

Once again... Great Job!

Team The Aries - Peer to Peer Code Review

Hello Hermela,
Thank you very much for your presentation.

  1. Milestone requirements should be fulfilled.
  2. main.rb is not yet executable.
  3. Code is breaking after 2 player types the name.

With all my respect...

15/05/2020 | Team-104-the-fornax

Great work so far Sayyod and Team
As a suggestion,

  1. let's add a test case to check if user is entering a value to a position which is already selected.
  2. Use require-relative instead of require in rspec file.

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.