Giter VIP home page Giter VIP logo

marittie-ci_pp2_rpsls's Introduction

Rock, Paper, Scissors, Lizard, Spock (PP2)

(Mario Castaldo)

Responsive mockup of the website

View the deployed website.

Table of Content

  1. Project Goals
  2. User Experience
    1. User stories
    2. Design
    3. Wireframes
  3. Features
  4. Technologies Used
    1. Languages
    2. Frameworks & Tools
  5. Testing
    1. HTML Validation
    2. CSS Validation
    3. JavaScript Validation
    4. Accessibility
    5. Performance
    6. Device testing
    7. Browser compatibility
    8. Testing user stories
  6. Bugs
  7. Deployment
  8. Credits
    1. Code
    2. Acknowledgements

Project Goals

Website owner goals

  • I want users to be able to play an enjoyable game.
  • I want users to return to the website to continue playing the game.

User goals

  • Learn the rules of the game.
  • Play a game that is enjoyable and challenging.
  • Play a game that encourages the user to return to the game after the first play through.
  • Play a game that has the objective to Win.

User experience

The user experience is structured around three main goals: (a) to allow users to learn the game, (b) interaction with the game (c) encourage users to return and play through again.

User stories

I have divided my user stories into two categories: first-time users and regular visitors, with the understanding that one of the key goals of the website is to encourage replayability of the game.

First-time users

  1. As a first-time user, I want to see the name of the game.
  2. As a first-time user, I want to understand the scope of the game.
  3. As a first-time user, I want to understand the rules of the game.
  4. As a first-time user, I want to be able to play the game across all personal devices.
  5. As a first-time user, I want to be able to see the choices made by me and the computer.
  6. As a first-time user, I want to keep track of my score to monitor my performance in the game.
  7. As a first-time user, I want to see the result of the "battle" between me and the computer at the end of the game.

Regular visitor

  1. As a regular visitor, I want to see the result og the "battle" between me and the computer.
  2. As a regular visitor, I want to see the difference in score between me and the computer.

Site owner

  1. As a site owner, I want users to be able to understand the scope of the game.
  2. As a site owner, I want users to be able to understand the rules of the game.
  3. As a site owner, I want users to be able to play and navigate the page easily so that users are more likely to have an enjoyable experience and return to the game.
  4. As a site owner, I want users to enjoy this version of the game from the serie Big Bang Theory.

Design

My overall approach to the design came from a desire to create a game that was fun, engaging and simple to understand.

Colour Scheme

I chose to use a shade of green and a shade of red as the primary scheme to bring to the user's mind connotations of nature and challenge. I chose shades of orange,blue and gray for the user and computer choice,the scores and the result to be able to draw particular attention when those values changes.

Typography

My body font is Fredoka One from Google Fonts. I chose this font because is aesthetically pleasing. Fredoka One is a big, round, bold font that is perfect for adding a little fun to games.

Imagery

I chose not to use photography on the website and adopted a cartoonish style instead. I did this to keep a consistent style across the website and promote a tone that was fun and engaging, particularly for children.

I found all the images on Google.

Features

Current Features

The game page contains 8 main sections:

  1. A header displaying the name of the game.
  2. Scope of the game.
  3. A button to direct the user to the rules of the game.
  4. The buttons to play the game.
  5. User and Computer choices showing when pressing a button.
  6. The result calculated between the user and computer choices.
  7. The User and the Computer score.
  8. The Rules of the game.

Feature 1: Header

This header is used to communicate to users the name of the game and what type of game it is.

Header

User stories covered by this feature:

  1. As a first-time user, I want to see the name of the game.

Feature 2: Scope

This feature is used to communicate to users the end goal of the game.

Scope

User stories covered by this feature:

  1. As a first-time user, I want to understand the scope of the game.
  2. As a site owner, I want users to be able to understand the scope of the game.

Feature 3: Button to navigate to the rules of the game

This button is used for user to navigate to the rules if the do not know the different combinations of the game.

Button

User stories covered by this feature:

  1. As a first-time user, I want to understand the rules of the game.
  2. As a site owner, I want users to be able to understand the rules of the game.

Feature 4: Buttons to play against the compputer

This buttons are the "weapons" the users will choose to start their game agains the computer.

Button

User stories covered by this feature:

  1. As a first-time user, I want to be able to play the game across all personal devices.
  2. As a site owner, I want users to be able to play and navigate the page easily so that users are more likely to have an enjoyable experience and return to the game.

Feature 5: User and Computer choices

This feature is used to display to users which "weapon" they and the computer have chosen.

Choices

User stories covered by this feature:

  1. As a first-time user, I want to be able to see the choices made by me and the computer.

Feature 6: Result

This feature is used to dispaly to users the result of the "battle" between them and the computer, declering if they have won or lost that round.

Result

User stories covered by this feature:

  1. As a first-time user, I want to see the result of the "battle" between me and the computer at the end of the game.
  2. As a regular visitor, I want to see the result of the "battle" between me and the computer.

Feature 7: Score

This feature is used to display the User and Computer score until the end of the game, it will also display the tie score when the user and the computer will choose the same "weapon".

Score

User stories covered by this feature:

  1. As a first-time user, I want to keep track of my score to monitor my performance in the game.
  2. As a regular visitor, I want to see the difference in score between me and the computer.

Feature 8: Rules

This feature is used to show, especially to new users, the rules of the game.

Rules

User stories covered by this feature:

  1. As a first-time user, I want to understand the rules of the game.
  2. As a site owner, I want users to be able to understand the rules of the game.

Wireframes

Wireframes:

Balsamiq Wireframes

Technologies used

Languages

Frameswork, libraries and other tools

  1. GitHub
  • GitHub was used as a remote repository to store project code.
  1. Font Awesome
  • Icons from Font Awesome were used throughout the site.
  1. Google Fonts
  • Fendoka One from Google Fonts were used as the main heading font throughout the site.
  1. Am I Responsive
  • Am I Responsive was used to create the multi-device mock-up you see at the start of this README.md file.
  1. Faivcon Generator
  • Favicon Generator was used to create a favicon for the website.

Testing

HTML Validation

The W3C Markup Validation Service was used to validate the HTML of the website. All pages passed with 0 errors.

CSS Validation

The W3C CSS Validation Service was used to validate the CSS of the website. Style.css passed with 0 errors.

JavaScript Validation

The JSHint was used to validate the JavaScript of the website. All scripts passed with 0 errors and 0 warnings.

Accessibility

The [WAVE WebAIM web accessibility evaluation tool] was used to ensure the website met high accessibility standards.

The website passes with 0 errors.

Performance

Google Lighthouse was used to measure the performance and speed of the website. The page passed with 94% score on performance, 100% on accessibility, 92% Best Practice and 100% on SEO.

Lighthouse

Performing tests on various devices

Devices tested:

  • MacBook Air
  • Iphone 7
  • Iphone 13 Pro
  • Samsung S 22

Browser compatibility

  • Microsoft Edge: Website and user stories work as expected.
  • Google Chrome: Website and user stories work as expected.
  • Safari: Website and user stories work as expected.
  • Firefox: Website and user stories work as expected.

Testing user stories

1. As a first-time user, I want to see the name of the game.

Feature Action Expected result Actual result
Read name of the game in the header of the page No action required, the header is displayed on the top of the page To find a name that is clear, readable and easy to understand Works as expected

2. As a first-time user, I want to understand the scope of the game.

Feature Action Expected result Actual result
Read the scope of the game just below the header No action required, the scope is displayed on the top of the page To understand the final scope of the game Works as expected

3. As a first-time user, I want to understand the rules of the game.

Feature Action Expected result Actual result
Button below the header to direct user to the rules of the game Click the button, user will navigate directly to the rules To understand the rules of the game Works as expected
A list with all the rules at the bottom of the page No action required, the rules are displayed at the bottom of the page To understand the rules of the game Works as expected

4. As a first-time user, I want to be able to play the game across all personal devices.

Feature Action Expected result Actual result
The webpage is fully responsive No action required All content to be present and arranged in a sensible layout Works as expected

5. As a first-time user, I want to be able to see the choices made by me and the computer.

Feature Action Expected result Actual result
5 Button with icons to choose as user choice Click the chosen button and the choice is displayed in the "You" section The name of the object in the icons will display in the "You" section when a button in clicked Works as expected
A section with the names 'You' and 'Computer' To display the choices made by the user and the computer The name of the object in the icons will display in the "You" and "Computer" sections when a button in clicked Works as expected

6. As a first-time user, I want to keep track of my score to monitor my performance in the game.

Feature Action Expected result Actual result
Score section below the user and computer choices No action required,the result is displayed right away when the user and the computer hava made their choices To display who, between the user and the computer has won the round and and the end the winner of the game Works as expected

7. As a first-time user, I want to see the result og the "battle" between me and the computer at the end of the game.

Feature Action Expected result Actual result
Score section below the user and computer choices No action required,the result is displayed as soon as the user or the computer scores 10 point To display who, between the user and the computer is the winner of the game Works as expected

8. As a regular visitor, I want to see the result og the "battle" between me and the computer.

Feature Action Expected result Actual result
Score section below the user and computer choices No action required,the result is displayed as soon as the user or the computer scores 10 point To display who, between the user and the computer is the winner of the game Works as expected
Score section below the user and computer choices No action required,the result is displayed as soon as the user or the computer scores 10 point To display who, between the user and the computer is the winner of the game Works as expected

9. As a regular visitor, I want to see the difference in score between me and the computer.

Feature Action Expected result Actual result
Score section below the user and computer choices No action required,the result is displayed as soon as the user or the computer scores 10 point To keep track of the scores Works as expected

10. As a site owner, I want users to be able to understand the scope of the game.

Feature Action Expected result Actual result
Read the scope of the game just below the header No action required, the scope is displayed on the top of the page To understand the final scope of the game Works as expected

11. As a site owner, I want users to be able to understand the rules of the game.

Feature Action Expected result Actual result
Button below the header to direct user to the rules of the game Click the button, user will navigate directly to the rules To understand the rules of the game Works as expected
A list with all the rules at the bottom of the page No action required, the rules are displayed at the bottom of the page To understand the rules of the game Works as expected

12. As a site owner, I want users to be able to play and navigate the page easily so that users are more likely to have an enjoyable experience and return to the game.

Feature Action Expected result Actual result
Top of the page with header, scope of the game and button to navigate to the rules Click on the button to navigate to the rules of the game Displaying name of the game,scope of the game and rules Works as expected
Challange section Click on the icon buttons to start and interact with the game To play the game Works as expected
Result and Score section No actions required, displaying the result and the score of the user and computer To display result and score Works as expected

Bugs:

No Bugs were found in the game.

Deployment

GitHub Pages

This website has been deployed using GitHub pages. To do the same...

  1. Log into your GitHub account and find the repository.
  2. Click on 'Settings' in the repository.
  3. Click 'Pages' in the left-hand menu once you're in Settings.
  4. Go to 'Branch'.
  5. Click on the button that says 'none', then select 'main'.
  6. Wait for page to refresh automatically.
  7. On the top of GitHub pages you can now find a link to the published live website.

Forking the GitHub Repository

By forking this GitHub repository you are making a copy of the original to view or make changes without affecting the original. You can do this by following these steps...

  1. Log into your GitHub account and find the repository.
  2. Click 'Fork' (third button on the top right of the repository page).
  3. You will then have a copy of the repository in your own GitHub account.

Making a Local Clone

  1. Log into your GitHub account and find the repository.
  2. Click on the 'Code' button (next to 'Add file').
  3. To clone the repository using HTTPS, under clone with HTTPS, copy the link.
  4. Then open Git Bash.
  5. Change the current working directory to where you want the cloned directory to be made.
  6. In your IDE's terminal type 'git clone' followed by the URL you copied.
  7. Press Enter.
  8. Your local clone will now be made.

Credits

Code

  • Anya Kubóv - From YouTube3 ways to code Rock Paper Scissors in JavaScript (Beginner to Intermediate to Advanced!). It gave me a good hint from where to start. particularly on the code for the function generateComputerChoice() and the function displayResult().
  • Stack Overflow - from StackOverflow for the code to end and reset the game. Line 160 of JavaScript
  • Student Support - For the "rough" codes they would give me in order to give me a base where to start to write my codes.
  • W3 Schools - From W3 Schools for the hints about different line of codes.

Acknowledgements:

  • To my girlfriend for the support,help with the daily tasks and feedback.
  • To my friends for testing, playing and giving me feedback about the game.
  • To my mentor Mo Shami for his feedback, advice and support.
  • To the Code Institute Tutor Support for their helpful advice, resources, guidance and support.

marittie-ci_pp2_rpsls's People

Contributors

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