Skip to content

flowmar/houston-bootcamp-hangman-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman Game

Concepts: Dynamic HTML via Javascript


In this assignment, we were tasked to create a 'Hangman' game.


Assignment:

## Option Two: Hangman Game (Challenge - Recommended)

Hangman

1. [Watch the demo](hangman-game-demo.mov).

2. Choose a theme for your game! In the demo, we picked an 80s theme: 80s questions, 80s sound and an 80s aesthetic. You can choose any subject for your theme, though, so be creative!

3. Use key events to listen for the letters that your players will type.

4. Display the following on the page:

* Press any key to get started!

* Wins: (# of times user guessed the word correctly).

* If the word is `madonna`, display it like this when the game starts: `_ _ _ _ _ _ _`.

* As the user guesses the correct letters, reveal them: `m a d o _  _ a`.

* Number of Guesses Remaining: (# of guesses remaining for the user).

* Letters Already Guessed: (Letters the user has guessed, displayed like `L Z Y H`).

5. After the user wins/loses the game should automatically choose another word and make the user play it.

##### Hangman Game Bonuses

1. Play a sound or song when the user guesses their word correctly, like in our demo.
2. Write some stylish CSS rules to make a design that fits your game's theme.
3. **HARD MODE:** Organize your game code as an object, except for the key events to get the letter guessed. This will be a challenge if you haven't coded with JavaScript before, but we encourage anyone already familiar with the language to try this out.
* Save your whole game and its properties in an object.
* Save any of your game's functions as methods, and call them underneath your object declaration using event listeners.
* Don't forget to place your global variables and functions above your object.
 * Remember: global variables, then objects, then calls.
* Definitely talk with a TA or your instructor if you get tripped up during this challenge.

Copyright

Coding Boot Camp © 2016. All Rights Reserved.


Deployment

The project was deployed to GitHub pages as: Bootstrap-Portfolio.

The source code is located here.


About the Author

Omar Imam

Find me on: GitHub Portfolio: Flowmar Connect with me on LinkedIn