Brian Kidd

Web and Multimedia Developer

Learn More →
Brian Kidd

OOP Game Show App

This JavaScript OOP uses a Game and a Phrase object to add letter placeholders to the browser of a randomly generated phrase. The player is able to then either click or type a letter guess. If the player is correct, then all instances of that letter are then shown, but if the player guesses wrong then he or she loses a heart: Five wrong guesses and the player loses. If the correct phrase is guessed, the overlay appears with the full phrase and then you have the option to try another phrase. If the player loses, the overlay appears with a message informing the player that he or she lost and can press start for a different phrase. Since this program uses objects you can add different properties to the Game and Phrase object and apply methods (functions that use an instnace of a class object) to the insantiated objects.

  • JavaScript
  • HTML
  • CSS
Live DemoGitHub Repo