Coder Social home page Coder Social logo

rps-game's Introduction

Rock paper scissors game

Install rbenv(ruby version manager)

Follow link https://github.com/rbenv/rbenv to install rbenv.

After installing rbenv install ruby version 2.6.5

$ rbenv install 2.6.5
$ rbenv rehash
$ rbenv global 2.6.5

Troubleshoot installed ruby version

$ ruby -v
or
$ rbenv version

Install dependencies

First navigate to application source code directory from terminal then run

$ bundle install --path vendor/bundle 

Note: It will install application specific dependencies inside vendor/bundle folder in the application directory.

Run application and test suit.

Run following command to start the game from application source directory.

$ ruby run.rb

Run test suite from application source directory:

$ bundle exec rspec spec.rb

How to play?

  1. Once you run ruby run.rb file it will ask "Do you want to play Human vs Computer?(Y/n)"
  2. Press 'Y' / 'y' / 'Press enter' key to play game as human vs computer mode. Then it will ask to enter your name and move. It will take name and move input from computer.
  3. Otherwise it will enter computer vs computer mode.

rps-game's People

Contributors

masudcsesust04 avatar

Stargazers

 avatar

Watchers

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