Skip to content

ChristianPredoianu/quiz-game-vanillajs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quiz Game


Logo

Quiz Game

Explore the docs »
View Demo · Report Bug

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgements

About The Project

A quiz game made with vanilla js.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/ChristianPredoianu/quiz-game-vanillajs.git
  2. Install NPM packages
    npm install
  3. Serve with hot reload at localhost
     npm run start
  4. Build for production
     npm run build
    

Usage

The user must select game options before starting the game. The options are: Category, difficulty, amount of questions and questions type (multiple or true/false). The game uses the Open trivia api. Some combinations of game options doesn't return any questions back from the api. This is a lack of questions from Open trivia api. For example category: Politics, difficulty: hard, amount of questions: 50 and type of questions: true/false. The user get's notified about this and has to choose other game options. For every questions there is a timer set to 15s. If the user doesn't choose an answer before the timer runs out the answers will be disabled and the user gets 0 point for that particular question. If the user doesn't choose an answer while the timer is active the user gets a notification to choose an answer. That means that the user can't go to the next question before choosing an answer while the timer is active. When all questions are answered the user is presented the total score in % and is asked to submit a name. When resetting the game, the game uses localstorage to set the players scores and showing the top 3 highscores at the start of the game.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Christian Predoianu - @linkedin - christianpredoianu@yahoo.com

Project Link: https://github.com/ChristianPredoianu/quiz-game-vanillajs

Acknowledgements