Skip to content

OJarvey/cricket-mastermind-quiz-pp2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cricket Mastermind Quiz

Welcome to Cricket Mastermind, the ultimate quiz platform to test your cricket knowledge! Whether you're a casual fan or a cricket lover, this site offers a variety of quizzes and information to challenge your understanding of the gentleman's game.

Am I responsive

Table of contents

  1. First Time Visitor Goals
  2. Features
  3. Responsive Design
  4. Interactivity
  5. Timer and Score Tracking
  6. Design and Validation Tools
  7. Wireframes
  8. Technologies Used
  9. Deployment
  10. Major Bugs and Fixes
  11. GitHub Deployment
  12. Fork Repository
  13. Clone Repository
  14. Meta Information
  15. Future Enhancements
  16. Credits

17.Special Thanks

First Time Visitor Goals

  • To test quiz knowledge in a selected subject
  • Discover interesting trivia
  • Enjoy a fun learning experience

Features

Home Page

The home page serves as the gateway to different sections of the website, including quizzes and rules.

Home Page

  • Cricket Mastermind Logo: Clickable logo that redirects to the home page.
  • Navigation Buttons:
    • Random Facts: Learn interesting cricket facts.
    • Guess The Player: Identify cricketers based on their images.
    • Rules: Understand the rules of the cricket quiz.

Random Facts Quiz

The Random Facts Quiz presents users with multiple-choice questions about cricket facts.

Facts Quiz

  • Question Section: Presents random cricket-related questions.
  • Answer Buttons: Four multiple-choice answers for each question.
  • Timer: 15 seconds per question to select the correct answer.
  • Score Display: Track your score as you progress through the quiz.
  • Play Again Option: Option to restart the quiz or return to the home page after completing the quiz.

Guess The Player Quiz

In the Guess the Player Quiz, users must identify cricketers based on their images.

Guess the Player Quiz

  • Player Image: Display an image of a cricketer to be identified.
  • Answer Buttons: Four multiple-choice options to guess the player.
  • Timer: 15 seconds per question to identify the player.
  • Score Display: Track your score as you progress through the quiz.
  • Play Again Option: Option to restart the quiz or return to the home page after completing the quiz.

Rules Page

Rules Page

  • Detailed Rules: Explanation of the rules of the cricket mastermind quiz in a well-structured format.
  • Navigation Button: Return to the home page.

404 Not Found Page

404 Page

  • Error Message: Informative message indicating the requested page could not be found.
  • Home Button: Quick access to return to the home page.

Responsive Design

The site is designed to be fully responsive, adapting to various screen sizes and devices.

Mobile View (Galaxy Z Fold)

The site adapts to different screen sizes, including foldable devices like the Galaxy Z Fold.

Guess Player Mobile View Home Mobile View

Interactivity

Interactive elements such as buttons provide visual feedback to the user.

Button Hover

Timer and Score Tracking

The quizzes feature a countdown timer and score tracking to enhance the gaming experience.

Countdown and Score

Design and Validation Tools

Various tools and validators were used to ensure the site is well-designed and compliant with web standards.

Color Palette

A consistent color palette was chosen to maintain a cohesive look throughout the site.

Color Palette

HTML and CSS Validation

The HTML and CSS code were validated to ensure compliance with web standards.

HTML Validator CSS Validator

JavaScript Validation

JavaScript code was checked for errors and best practices using JSHint.

Guess Player JS Validation Script JS Validation

Performance Checks

Lighthouse performance check tool was used to ensure the site performs well on both desktop and mobile.

Lighthouse Desktop Check Lighthouse Mobile Check

Wireframes

Index Page

Home Page Wireframe

Facts Quiz

Random Facts Quiz Wireframe

Guess The Player Page

Guess The Player Quiz Wireframe

Rules

Rules Page Wireframe

404 Page

404 Wireframe

Technologies Used

  • HTML: Structure of the web pages.
  • CSS: Styling of the web pages, including responsive design for various screen sizes.
  • JavaScript: Interactive features such as quizzes, timers, and score tracking.
  • Google Fonts: Custom fonts for a unique look and feel.
  • Favicon: Custom cricket-themed icons for the website.
  • Wireframes: Visual layout and structure designs created using [Balsamiq Wireframes]

Deployment

Major Bugs and Fixes

  1. Buttons Staying Blue After Click

    • Issue: On smaller devices, the buttons stayed blue after being clicked.
    • Solution: Added CSS rules to prevent this behaviour by setting the focus state of the buttons.
  2. Redirecting to 404 Page on Button Click

    • Issue: The page kept redirecting to the 404 page whenever a button was clicked, even when the correct answer was selected.
    • Solution: Fixed the bug by ensuring the checkAnswer function was properly defined and accessible in the script.
  3. Undefined Functions Causing Errors

    • Issue: checkAnswer and other functions were not being recognized, causing the game to crash.
    • Solution: Ensured all necessary functions were defined and exposed to the global scope if needed.
  4. Missing HTML Elements Causing Script Failures

    • Issue: The script was failing because certain HTML elements were not found.
    • Solution: Added checks to ensure all elements were properly referenced.
  5. Incorrect Media Query Behavior for Buttons

    • Issue: Buttons were not aligning properly on different screen sizes, and their appearance was inconsistent.
    • Solution: Adjusted media queries to ensure buttons are displayed correctly on various screen sizes.

GitHub Deployment

  • To deploy using GitHub pages.
    • Login or Sign Up to GitHub.
    • Open the project repository.
    • Navigate to "Settings" on the navigation bar under the repository title.
    • Click on "Pages" in the left-hand navigation panel.
    • Under "Source", choose which branch to deploy (Main or Master).
    • Choose which folder to deploy from, usually "/root".
    • Click "Save", then wait for the page to be deployed.
    • The URL is displayed above "Source".

Fork Repository

Clone Repository

  • To clone the repository
    • Login or Sign Up to GitHub
    • Naviagte to the repositary for this project Cricket Mastermind
    • Click on the "Code" button
      • Select how you would like to clone (HTTPS, SSH, or GitHub CLI)
      • Copy your chosen link
      • Open the terminal of your code editor or IDE
      • Change the current working directory to the location you want to use for the cloned directory
      • Type "git clone" into the terminal followed by the copied link and press enter.

Meta Information

  • Description: "Cricket, The Gentlemen's Game."
  • Keywords: "Cricket, sport, exercise cricket knowledge, know your cricket."

Future Enhancements

  • More Quizzes: Addition of more quiz types and questions.
  • Leaderboard: Feature to compare scores with other users.
  • User Accounts: Allow users to create accounts and track their progress.

Credits

Icons

Font Style

Players Images and Articles

CSS Styling

Background Image

404 Image

Special Thanks

  • Spencer Barriball: For his continuous encouragement and support during this period.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published