A simple Node.js command-line Rock-Paper-Scissors game where you play against the computer in a best-of-5 match. The computer makes random choices, and the script keeps score to declare a final winner. Outputs are color-coded for a more fun experience.
-
Clone the repo:
git clone <https://github.com/DevOlabode/rock-paper-scissors-with-node>
-
Install dependencies:
npm install
-
Run the game:
node script.js
You'll be prompted to choose either rock, paper, or scissors for each round. After 5 rounds, the script will display the final result.
Choose either rock, paper, scissors: rock
You chose ROCK
Computer chose SCISSORS
You win! ROCK beats SCISSORS
Scores: You: 1 | Computer: 0
- Javascript
- Node.js
- prompt-sync - For user input
- colors - For colorful terminal output
- The Odin Project