Skip to content

owleyeview/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock, Paper, Scissors Game

This is a simple single page web application for the classic game of Rock, Paper, Scissors. Built from a provided Figma design using vanilla JavaScript, HTML, and CSS.

How to Play

  1. Load the page to start the game. You will see a start button prompting you to start the game.
  2. Click the start button to enable the choice images. The text of the start button will change to prompt you to play your hand.
  3. Click on one of the hand icons to make your choice of 'rock', 'paper', or 'scissors'. The image will change color when you click on it.
  4. After making your choice, click the start button to play your hand. The subtitle will display the outcome of the game.
  5. The start button will then prompt you to play again. Click the start button to reset the hand choices and start a new game.
  6. The score is displayed in a text area at the bottom right of the page. The score is updated after each game.

Code Overview

The code for the game is divided into three main files:

  • index.html: This is the main HTML file that displays the game interface. It includes the game title, subtitle, web font icons for the player's choices, the start button, and the score text area.

  • css/styles.css: This CSS file contains all the styles for the game. It includes styles for the game title, subtitle, choice icons, start button, and score text area. It also includes styles for the hover effect on the icons and start button.

  • js/script.js: This JavaScript file contains all the game logic. It includes functions for starting the game, handling the player's choice, determining the game result, updating the score, and resetting the game. It also includes event listeners for the hand icons and the start button.

Enjoy the Game!

I hope you enjoy playing this simple yet fun game of Rock, Paper, Scissors. Good luck!

Releases

No releases published

Packages

No packages published