Giter VIP home page Giter VIP logo

project-32's Introduction

Rock to Spock

Rock to Spock is an interesting take on the original rock, paper scizzors game. In this game there are two additional moves called lizard and spock. This adds a new dynamic to the game, allowing for new winning combinations in the game. The game is played against a computer which randomly selects moves from the available options. This allows the game to be completely random, making it difficult for the user to predict patterns.

Image of Rock to Spock site on different screen sizes

Features

Existing Features

  • Header
    • Starting at the beginning of the page, the header includes the game title Rock to Spock and also the game logo.
    • The game logo shows a closed fist to represent the move of rock.
    • The text colour is black up against a blue background for optimal contrast.

Image of the Rock to Spock header and logo

  • Game Controls
    • This includes six buttons to select the moves of: rock, paper, scizzors, lizard and spock.
    • The buttons have the same colour scheme as the header, with blue text against a black background encircled by a blue border.
    • The buttons also rotate when the user hovers over them to indicate that they are clickable.
    • When the buttons are clicked, the game initiates and the images for the player and computer change from the rule image to the corresponding slected move.

Image of the different moves that the player can select

  • Game Rules
    • Before the user selects a button, the starting image for the player and computer moves shows an image explaining the rules of the game, and which win agianst other moves.

Image showing the rules of the game

  • Game Area
    • Once a move is selected by the user, the game is initiated and the player image is changed to their selected move.
    • Symultaneously and randomly the computer also selects a move to play and changes the corresponding image to match the selected move.

Image of the game where player selects lizard and the computer selects paper

  • Score Board
    • After the player and computer selects their moves, they are compared and then the score board keeps track of the wins of the player and computer.
    • Whilst the score is recorded, a popup is initiated to inform the user whether they win, lose or draw against the computer.

Image showing the scores of both the player and computer

  • Restart Button
    • The game also has a Restart button. The background turns blue and the colour of the text turns black when the user hovers over the button to indicate that it is different from the other buttons.
    • This button resets the game returning the player and the computer images to the starting image, showing the rules.
    • Also, resetting the score board back to zero for both the player and the computer.

Image of the restart button

Future Feature to Implement

In the Future, I would like to make the move images for the player and computer to rotate before they change to the selected moves. This would represent how the original game is played, when the two players would say each move whilst bouncing their fists before deciding their move.

Testing

  • This site was tested on various different browsers, such as: Chrome, Firefox and Safari
  • I confirm that the results are always correct
    • I have tested by playing on different devices such as Macbook, Mobile phone (Samsung), and also Ipad.
  • I confirm that the header, controls, game area, score board are all legible and easy to read.
  • I confirm that the colour scheme and fonts are easy to read and accessible by running the site through the Devtools lighthouse report generator.

Image showing the lighthouse report of the site

  • I confirm that the site is responsive on all devices and screen sizes.
    • This was tested using the Chrome Devtools,
    • and also by testing the site on different devices.

Bugs

Solved Bugs

  • The Header, Score board text and game area text, for smaller screen sizes, was very small due using font-size in % units.
    • I solved this by using rem instead of %.
  • On smaller screen sizes, the buttons would appear below on another, but were misaligned.
    • This was due to the buttons content width being too large for the buttons themselves on smaller devises.
    • I solved this by reducing the text of the buttons for smaller devices and changing the margins around each button.

Validator Testing

  • HTML
    • No errors were returned when running the site through the official W3C HTML validator
  • CSS
    • No errors were returned when running the site through the W3C CSS validator
  • JS
    • No errors were returned when running the site through the JSHint JSHint validator

Unfixed Bugs

No unfixed bugs

Deployment

  • The site was deployed on GitHub Pages. The following steps demonstate how to deploy the site.
    • In the GitHub repository for the project, locate the settings tab,
    • From the menu left of this, select the pages tab,
    • Under the source section, select the main branch from the drop down menu and save,
    • A live link will then be provided for the website

The live link for the website is located here Rock to Spock.

Credits

Content

  • The popups alerts on the site were taken by SweetAlert
  • The logo in the header was obtained from FontAwesome

Media

  • The image for the game was taken from UBuy

project-32's People

Contributors

reececilon avatar

Watchers

 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.