Giter Club home page Giter Club logo

-niclastanskanen-project2's Introduction

The Rock Spock Dude

This game is a variation of Rock Paper Scissors that has gained popularity because of the television show The Big Bang Theory.

Spock, usually Mr. Spock, is a fictional character in the Star Trek media series. Spock was first portrayed by Leonard Nimoy in the original Star Trek series.

Playing the game with the lizard and Spock will result in fewer ties.

We've made a game for you who've had enough of the classic rock paper scissors game. Challenge the computer and see if you can become The Rock Spock Dude!

Good luck to the first 5!

The live link can be found here - The Rock Spock Dude

Responsice Mockup

Features


Existing Features

  • Header

    • You are invited with a wonderful feeling. Pink has many positive associations. It is a calming, non-threatening color. It is linked to innocence, hope and optimism.

Header


  • Game Area

    • On the left of the game area, you can see your own choice. The computer's choice is shown on the right. Game area

    • It is clear which choice you made and which one the computer made. The results section shows if you won, lost, or drew.

You win You lose


  • Game Buttons

    • As a result of its structure with JavaScript, the computer randomly selects a number from 1 to 5, so the outcome is determined by chance.
    • Your choices can be found by clicking the buttons.
    • The following are from left to right: Rock, Paper, Scissors, Spock, Lizard.
    • User and the computer's points are visible below the buttons, this allows the user to quickly see how many points they have.
    • First to get to 5 wins.

Game buttons


  • Winning/losing

    • When you win, you can either press "OK", otherwise anywhere on the page. The game restarts automatically and resets previous choices and results. This makes the user experience better.
    • If you win, an alert will be sent out stating that you are "The Rock Spock Dude!"

Winner alert

  • If you lose, an alert will be sent out stating that you are "Trash!"
  • It even has a link to the main page that says, "Why am I trash?"
  • A little extra sourness is added when you lose this way!

Loser alert


  • Reset and How To Play

    • Two buttons, easily accessible and "stand out" from the background with shading.
    • Press reset to reset the current result and previous choice.
    • How to play opens an easy-to-read information about the game as well as rules.

Reset and How To Play Buttons


  • How To Play

    • A shaded popup with information about the game and rules. You close the box by either pressing X or anywhere on the page.
    • Emojis to give the user a clearer overview.

How to play


  • The Spock Dude

    • The spock dude.

Sign Up


Testing

I have tested the page in different browsers: Chrome, Safari, Microsoft Edge.

The entire project is tested with devtools device toolbar and everything works responsively, looks good and arranges itself depending on the size of the screen.

Validator Testing

  • HTML

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

  • JavaScript

    • No error found, only 23 warnings about ES6jshint
  • Lighthouse

    • lighthouse

Unfixed Bugs

JavaScript fails to load properly due to a bug in the chrome extension. I am unable to figure out where it is coming from. I haven't been able to get a clear answer from anyone I've spoken with either. Seems to be local to me, I get no warnings in incognito mode.

chrome extensions bug


Credits

Content

Gradient background inspiration - https://mycolor.space/

Rules for the game - https://www.had2know.org/

"How to play" popup modal - https://www.w3schools.com/

Smart Alert warning (winner/loser pop up) - https://sweetalert2.github.io/

Media

ACKNOWLEDGEMENTS


Mentor Jubril Akolade from Code Institute. Can't express in words how grateful I am for him helping me with the Chrome extension bug. After troubleshooting by myself for 9 hours, Jubril jumped in and debugged with me for over 1 hour before we (Jubril) came to the conclusion that there was nothing wrong with the code, it was Chrome.

Thank you Jubril!

-niclastanskanen-project2's People

Contributors

niclastanskanen 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.