Skip to content

P202U/Rock-Paper-Scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rock-Paper-Scissors

This repository contains a JavaScript program for a simple Rock-Paper-Scissors game.

How to Play:

  • Clone or download the repository.
  • Open the index.html file (or any HTML file that references the script) in your web browser.
  • Click "Run" or refresh the page.
  • The game will prompt you to enter your choice (rock, paper, or scissors) for each of the five rounds.
  • After each round, the winner will be displayed.
  • At the end of the game, the overall winner and scores will be shown.

Functionality:

  • The game uses JavaScript functions to generate the computer's choice, get the user's choice, determine the winner of each round, and keep track of the score.
  • The game logic utilizes modulo operation (%) to determine the winner based on the difference between the player's and computer's choices.

Live preview: Rock-Paper-Scissors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published