Command Line Rock Paper Scissors.
For this assignment, you will build a Rock, Paper, Scissors game in the terminal.
Instructions for lab submission
- Fork the assignment repo
- Clone your Fork to your machine
- Complete the lab
- Push your changes to your Fork
- Notify instructors by Slack or email once you're done.
Requirements
- The user must be able to play against the computer
- The user must be given the option to pick from rock, paper or scissors
- The computer must chose randomly between rock, paper, scissors.
- Once both the computer and the user have chosen, the game should tell who won.
- Handle user entering 'r' or 'R' as
Rock
. Same for the rest. - If user enters a letter that is none of
r
,R
,s
,S
,p
orP
. Display a messageInvalid choice
and quit the game.
Notes
- Use the
readline-sync
module to receive input from the user. - A sample of how to use
readline-sync
is in the filesample.js
in this repo. Check it out. - The
readline-sync
module has already been installed and its inside thenode_modules
folder. The only thing you need to do with it is learn how to use it. Read the docs.
Demo
Rubric
To find the rubric that will be used to grade your work for this assignment, locate this assignment on you Canvas course.