I used JavaScript and OOP (Object-Oriented Programming) to create a word guessing game: "Phrase Hunter." When starting the game, a hidden, random phrase (of a list of five phrases) is chosen, and put onto the gameboard using placeholders. The player tries to guess a letter either by mouse or keyboard. The game tracks which phrases were guessed correctly and lets the player continue until all 5 phrases are guessed correctly.
Animate.css is used for animations.
A live version of this project can be found here.
- Download or clone from Github
- Open
index.html
with your favorite browser
- ES6 Classes (OOP)
- Array methods
- DOM manipulation
- DOM event handlers
- I tried to write the code as clear as possible; all class methods are commented, additional comments only when they seemed necessary
- Constants are all uppercase, spaced out with underscores for readability
- Additional spaces around nested function calls