Git Product home page Git Product logo

zvonimir667-milestone2's Introduction

Rock, Paper, Scissors, Lizard, Spock game

Rock, Paper, Scissors, Lizard, Spock is a game of chance that expands the traditional game of Rock, Paper, Scissors. The game was originally created by Sam Kass with Karen Bryla. Users can have fun with this extended traditional game playing against computer and learning new rules for the game.

Features

  • Header
    • At the top of the page is name of the game which inicates to user what game they are playing.

Screenshot of title

  • Game options
    • Game options include 5 interactive buttons that the user can click and make their choice.

Screenshot of buttons

  • Game Results
    • After user clicks their option, image will change depending of their option.
    • JavaScript code chooses a random option for the computer and also change computer picture depending of the option.
    • JavaScript code determines the winner and displays it below the images.
    • The score is updated for the player and the computer after every game.
    • First one to reach 5 points wins the game.

Screenshot of game

  • The Footer
    • The footer section explains rules for the game so the user can understand how the game is played.

Screenshot of footer

Testing

Validator testing

  • HTML
    • No errors were returned when passing through the official W3C validator.

Screenshot of testing1

  • CSS
    • No errors were found when passing through the official (Jigsaw) validator.

Screenshot of testing2

  • JavaScript validator

    • No errors were foubd when passing through the JSHint JavaScript validator.
  • Lighthouse testing

    • For desktop testing results are as follows:

Screenshot of lighthouse testing1

  • For mobile testing results are as follows:

Screenshot of lighthouse testing2

  • WAVE testing
    • Also I did a WAVE testing

Screenshot of WAVE testing

Bugs

Solved bugs

Error1

  • When creating a game I encounter a problem with result. My code for result was
    • let result = checkWinner(playerChoice, computerChoice);
  • Fixed the problem with a code
    • let result = checkWinner(choices[playerChoice], choices[computerChoice]);

Error2 Error3

  • Later in development in game I could not get a tie so I added console.log for player, computer and result to see what I did wrong. I fixed that part adding computerChoiceIndex for computerChoice and fixed the problem.

Unsolved bugs

  • There were no usolved bugs

Deployment

  • The site was deployed to GitHub pages. The steps to deploy are as follows:
    • In the GitHub repository, navigate to the Settings tab
    • From the source section drop-down menu, select the Pages
    • In Build and deployment select source Deploy from a branch
    • Choose branch main and save
    • On top the Pages you will find the link to indicate the successful deployment

The live link can be found here - https://zvonimir667.github.io/milestone2/

Credits

Code used

  • The structure for the code and the game was inspired by Love Maths project particularly HTML and CSS, and JavaScript was written mostly by trial and error until satisfactory result.
  • Fonts used are from Google Fonts.

Media

zvonimir667-milestone2's People

Contributors

zvonimir667 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.