Laura Coronel

Flexbox of Fortune: OOP Game Show App

In this project, I created a browser-based, word guessing game: Flexbox of Fortune. I used JavaScript and Object-Oriented Programming to select a random hidden phrase which a player tries to guess by clicking letters on their keyboard or on an onscreen keyboard. My code chooses a random phrase, splits the phrase into letters, and puts those letters onto the gameboard.

Each time the player guesses a letter, the program compares it with the random phrase. If the letter is in the phrase, the game board displays where it appears on the screen. A player continues to select letters until they guess the phrase and win, or make five incorrect guesses and lose. If the player completes the phrase before they run out of guesses, a winning screen appears. If the player guesses incorrectly five times, a losing screen appears. A player can guess a letter only once. After they've guessed a letter, that letter is disabled on the onscreen keyboard.

A personalization change I made was grouping the phrase by word instead of individual letters. I did this because I noticed when the display size changes the phrase gets wrapped by the individual letter not by word. This made determining the number of words in the phrase difficult.

Image of Project #4Image of Project #4Image of Project #4