Skip to content

ibimina/rock-paper-scissors-game

Repository files navigation

Rock Paper SicssorsGame

Scrimba frontend learning Path

This is a rock paper sicssors game designed and created by yours truly Ibimina Hart

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • Play a game with computer opponent
  • Return to continue game if the exist button/link is click
  • See the user clicked button and computer chosen option
  • End game and start a new one
  • Read the rules of the game

Screenshot

phone ipad Desktop

Links

My process

Built with

  • Semantic HTML5
  • CSS custom properties
  • Flexbox
  • Grid
  • Mobile-first workflow

Proud of this

This enables the user to continue game from where they stopped without reloading the page

if (localStorage.getItem("human") && localStorage.getItem("comp")) {
  humanScore.textContent = localStorage.getItem("human");
  computerScore.textContent = localStorage.getItem("comp");
}

This resets the game for a user to a new game

const cls = () => {
  localStorage.human = 0;
  localStorage.comp = 0;
  humanScore.textContent = localStorage.getItem("human");
  computerScore.textContent = localStorage.getItem("comp");
};

Continued development

Javascript and React framework

Author

About

rock paper scissors game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published