Skip to content

Latest commit

 

History

History
87 lines (57 loc) · 2.24 KB

README.md

File metadata and controls

87 lines (57 loc) · 2.24 KB

React Rock Paper Scissors CLI

Interactive Terminal or Command Prompt Game

Project Game CLI Instructions

Make sure you've git, yarn & nodejs installed in your system.

Open terminal and follow these steps;

  • Step 1: Clone the repo.
git clone https://github.com/ekas/react-rock-paper-scissors

You should now see a react-rock-paper-scissors folder in your present working directory. Let's change directory to it.

cd react-rock-paper-scissors/
cd GameCLI
  • Step 2: CLI Build Instructions. Install dependencies.
yarn install

This will use yarn to install project dependencies.

  • Step 3: Start the CLI project on the terminal.
yarn start

This will start game on Terminal and from there follow instructions on the terminal

Project Extension

  • If you would like to add more Game Objects.
  • Simply open gameEngine.js file you wil find a GameRules. Add JSON as follows:
{
    name: "pencil",
    rules: {
      pencil: undefined, //default case when opponet choose the same Object
      paper: true
      scissors: false,
      rock: true,
    },
},
Note: Add rule for pencil in other json Objects

- `true` if other object beats pencil
- `false` if other object does notbeats pencil

Project Features

  • Simple Rock Paper Scissors Game Command Line Interface Game.
  • Choose mode between Player vs Computer or Computer vs Computer.
  • For Player vs Computer, user will asked chose an option. User will see a loader saying Evaluating.... System will select a random selection for computer player and will display result.
  • For Player vs Computer, User will see a loader saying Evaluating.... System will select a random selection for both computer 1 and Computer 2 player and will display result respectively.
  • Additionally, User will be prompted with option to continue play or not.

Project Screenshots

Img 1

Img 2

Img 3

Img 4

Img 5

Img 6

Thank You