Skip to content

anisbouhadida/RockPaperScissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock Paper Scissors

Description :

This project is an implementation of the classic "rock paper scissors" game, it was developped following along with the "Web Development 101" curriculum of THE ODIN PROJECT.

The main goal of this project is to practice and master diffrent fundamentals of javaScript including :

  • javaScript Event listener.
  • javaScript DOM manipulation.
  • Function's return value.

Table of Contents :

  1. Installation
  2. Usage
  3. License

1. Installation :

Since this is a front-end project based on HTML5, CSS and Vanilla javaScript no installation is required, you'll just have to clone it to your local repository and open the index.html file in your browser.

You can choose to use either the english version by openning the index.html file present in the en/ directory or the french version by opening the index-fr.html file present in the fr/ directory.

2. Usage :

Unlike the real game where two players oppose each other, here the player opposes the computer for a 5 round play.

At the end if the player gets a higher score than the computer he wins, otherwise if the score is lower then he loses.

Right after opening the index.html file, the player is on the main game page where he can find 2 groupes of buttons (May change on mobile!) :

main interface

  • Buttons on the left-side of the interface :
    • The ? button lets the player show the help box that explains the game rules and how to paly it.
    • The Translation button redirects the player to the other laguage page of the game (en -> fr) OR (fr -> en).
  • Buttons in the center of the interface : These are the play buttons, during the game the player will choose each time one option by clicking on the according button. The game starts automatically when the player makes his first choice.

When the game starts and each time the palyer makes a choice, a box appears in the middle of the interface. This box shows the game's info :

  • The round that is played.
  • The player's and computer's choice for the current round.
  • The total score of the palyer and the computer.

Score box

At the end of the 5 round-play, the result is shown and a Play again button appears on the bottom left side of the interface allowing the player to redo the game.

Final Score

3. License :

MIT License

Copyright (c) 2018 Anis Bouhadida

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

No description or website provided.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors