Skip to content

KC-7/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  • Introduction
  • Technical Details
  • Getting Started
  • Gameplay
  • Assets
  • Contributing
  • Sources

Introduction

Rock, Paper, Scissors is a classic game that is played with two players, who each choose one of three options: rock, paper, or scissors. The player who chooses rock wins against scissors, paper wins against rock, and scissors wins against paper. The objective of the game is to defeat the opponent by selecting a hand gesture that beats the opponent's gesture.

This implementation of Rock, Paper, Scissors is a browser-based game written in JavaScript and HTML. The game allows you to play against the computer and keep track of your score.

Technical Details

This project is built with HTML, CSS, and JavaScript. The HTML file defines the structure and content of the game, the CSS styles the game, and the JavaScript handles the game logic and events.

Getting Started

To play Rock, Paper, Scissors, you will need to enter python3 -m http.server into the consol or simply use this live link.

How to play

The game is an expansion on the classic Rock, Paper, Scissors. Each player picks a variable and reveals it at the same time. The winner is the one who defeats the others. In case of a tie, the process is repeated until a winner is found. The game rules are:

  • Scissors cuts Paper
  • Paper covers Rock
  • Rock crushes Lizard
  • Lizard poisons Spock
  • Spock smashes Scissors
  • Scissors decapitates Lizard
  • Lizard eats Paper
  • Paper disproves Spock
  • Spock vaporizes Rock
  • Rock crushes Scissors

Gameplay

To play Rock, Paper, Scissors, follow these steps:

Choose one of the three options: rock, paper, or scissors.

  • The computer will make its selection.
  • The winner will be determined and the scores will be updated.
  • A tie will result in a new round being played. The game will continue until a player reaches a score of five.

Assets

The game uses the following assets:

assets/css/styles.css: the stylesheet for the game
assets/js/script.js: the JavaScript file that contains the game logic and events

Future Improvements

  • Responsive design to be implemented using css media queries in the stylesheet.
  • Add favicon image.
  • Lizard, Spock to game.

Contributing

Contributions to the Rock, Paper, Scissors project are welcome. If you would like to contribute, please follow these steps:

  • Clone the repository.
  • Create a new branch for your changes.
  • Make the changes and commit them to your branch.
  • Submit a pull request for review.

Sources

This basic demo project was created using resources from the following sources:

  • ChatGPT - used in part for the readme to assit in documenting the project
  • W3Schools - favicon
  • Font Awesome - Icons
  • Web Dev Simplified Youtube Channel - RPS Walkthrough Coding Project

About

Rock Paper Scissors In JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published