luceroweb / trivia-and-chill

Using information from The Movie Database API, create a collaborative game where trivia about a movie (movie name, performers, genre, year produced, etc) is provided as a hint, and the user must guess the correct answer based on a list of possible answers. The user has ‘X’ seconds to answer. Click an answer to confirm your guess. If your guess is correct, then you will be rewarded with a link to play the movie trailer. Additional correct guesses will display a badge with the number of correct guesses. An incorrect guess will clear the badge and reset the game. The game can be played with one or more players at a time in person or using a screen share service like Zoom.
https://luceroweb.github.io/guess-the-movie
1 stars 9 forks source link

Js 163 bug question construction #188

Closed SmiJa closed 2 years ago

SmiJa commented 2 years ago

Changes

  1. Created recursive helper function to check for undefined data
  2. Alert user of error
  3. Change scene to Main

Purpose

The purpose is to have the function catch any undefined data and select a new movie and throw an error after 3 runs.

Approach

It avoids undefined data from the question or answer construction.

Closes #163