Skip to content
 
 

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Trivia

A simple CLI trivia game. With 2 Versions. Needs both git and npm already on your machine.

Versions

Versions get their own branches.

v0.1 Multi-answer(main)

  • Hard-coded questions via Json.
  • Supports multiple answers to one question using a any/all answer matching filter.
  • Answers are manually typed and normalized.
  • Multiple answers are split by commas.

v0.2 Multiple-choice(Recommended version)

  • A user inputs the number corresponding to the correct answer.
  • Dynamic questions and answers imported via OpenTDB API.
  • Does not have the multi-answer logic (could not make it work with APIs).

Features

  • Asks for your name
  • Gives you a welcome
  • Logs user input
  • modularized the codebase for scalability

In the works

  • Custom looks using chalk
  • Animations using chalk-animation and more
  • Better comments
  • etc.

Questions follow this format

This is only relevant for v0.1

{ "question": "What keyword declares a variable in java?", "answer": ["let"], "match": "all" }

With commas in-between questions. All incapsulated in an array.

Kindly run npm install once, then just run npm start to start the trivia.

About

A CLI trivia game written in Javascript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages