Git Product home page Git Product logo

tic-tac-toe's Introduction

TIC TAC TOE GAME

Ruby code for tic-tac-toe Game.

screenshot

Game rules

Tic tac toe game consists in a 3 by 3 board and two players.
Players choose between X and O as their tokens to play.
Players take turns to play their token in a unoccupied cell.
The first player who gets three of their tokens in line wins the game.
If no player gets three tokens in line and the board is full it is a tie.

Live Demo

Try on repl.it

Installation

Open a bash console and type:

Built With

  • RUBY
  • VSCode

Testing

We are using RSpec testing tool to test all enumerable methods. Also some detailed documentation about this tool

Install

  • In a terminal window type gem install rspec
  • Once rspec install has finished, type rspec --init
  • You will see a folder spec and a file .rspec
  • Inside spec folder you'll see a spec_helper.rb file.

Run

We have already created rspec-testing files called board_spec.rb, helper_spec.rb, player_spec.rb and spec_helper.rb if you want to create another one with the end [your file name]_spec.rb

  • go to the folder inside your terminal type rspec
  • If all test were passed you will see:

15 examples, 0 failures

Else you'll see a red message, then check errors and fix them

Authors

👤 Abel Lavieri

👤 Shingirayi Mandebvu

🤝 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

  • Microverse

📝 License

This project is MIT licensed.

tic-tac-toe's People

Contributors

alvp01 avatar simandebvu avatar mikethreels avatar

Stargazers

Ghulam Reza Rajabi avatar steven wafeek avatar Hafiz Rasa avatar Jackson Paredes Ferranti avatar Santiago Velosa avatar Dico Diaz Dussan avatar German Renato Cobian avatar Dawit Admassu avatar gagc056 avatar Alfredo C. avatar Maria Eugenia Quemé Peña avatar Luis Novoa avatar Adrian Flores Pizarro avatar Berhanu Tarekegn avatar WinterCore avatar Carlos Veiga avatar Gerónimo M. avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

simandebvu

tic-tac-toe's Issues

Readme and Final Touches

  • Add a full description of game rules in README file
  • Inform the players on how to start your game

Game Logic

  • main.rb file should be responsible for user interaction.
  • Single Responsibility Rule and No one class for everything.
  • Cover all edge cases

User Interface Setup

Requirements

  • main.rb file should be responsible for user interaction.
  • Collect user input and mimic gameplay

Project Setup

  • Create lib and bin folders
  • Make bin/main.rb executable

Minskins review 6/24

Your test looks great and works fine nice job

Rubocop Aproves it

                   /~@@~\,
 _______ . _\_\___/\ __ /\___|_|_ . _______
/ ____  |=|      \  <_+>  /      |=|  ____ \
~|    |\|=|======\\______//======|=|/|    |~
 |_   |    \      |      |      /    |    |
  \==-|     \     |  2D  |     /     |----|~~)
  |   |      |    |      |    |      |____/~/
  |   |       \____\____/____/      /    / /
  |   |         {----------}       /____/ /
  |___|        /~~~~~~~~~~~~\     |_/~|_|/
   \_/        [/~~~~~||~~~~~\]     /__|\
   | |         |    ||||    |     (/|[[\)
   [_]        |     |  |     |
              |_____|  |_____|
              (_____)  (_____)
              |     |  |     |
              |     |  |     |
              |/~~~\|  |/~~~\|
              /|___|\  /|___|\
             <_______><_______>

The minskins - 16/06/20

Great job, man! Keep up the good work!

We suggest a few things:

  • Fix the author icon on readme file, the one besides Shingi's name;
  • Remove the executable from player.rb;
          0 _____
           X_____\
   .-^-.  ||_| |_||  .-^-.
  /_\_/_\_|  |_|  |_/_\_/_\
  ||(_)| __\_____/__ |(_)||
  \/| | |::|\```/|::| | |\/
  /`---_|::|-+-+-|::|_---'\
 / /  \ |::|-|-|-|::| /  \ \
/_/   /|`--'-+-+-`--'|\   \_\
| \  / |===/_\ /_\===| \  / |
|  \/  /---/-/-\-\  o\  \/  |
| ||| | O / /   \ \   | ||| |
| ||| ||-------------|o|||| |
| ||| ||----\ | /----|o|||| |
| _|| ||-----|||-----|o|||_ |
\/|\/  |     |||     |o|\/|\/
\_o/   |----|||||----|-' \o_/
       |##  |   |  ##|
       |----|   |----|
       ||__ |   | __||
      [|'  `|] [|'  `|]
      [|`--'|] [|`--'|]
      /|__| |\ /| |__|\
      ||  | || || |  ||
      ||__|_|| ||_|__||
      ||    || ||    ||
      \|----|/ \|----|/   
      /______\ /______\
      |__||__| |__||__|

Here is a robot to help you fight Rubocop!

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.