Here are the instructions I was given to create a hangman game, the game must use jpegs and display the correct and incorrect letters, the incorrect letter must turn red after being chosen. Correct letters should also change green after being chosen.
1. Create a new Java project named “Project6_netid” (where you replace netid with your NetID), copy files from Projects 3, 4, and 5 to this new project
2. You now have all of the pieces needed to complete the game, so make it work a. Coordinate the user input to appropriately change the alphabet panel, the person, and the guess phrase based on each letter pressed. Hint: you may need to make your HangmanGame a JFrame as well. b. Modify AlphabetPanel to turn incorrect letters a different color (like red) after they have been guessed. Similarly, correct letter guesses should also be turned a different color (like green) after being entered by the user. Hint: you may need to move the AlphabetPanel’s key listener into your HangmanGame class. c. Clicking in the window should not advance the person – only incorrect letters should do that and ONLY the first time the incorrect letter is pressed (pressing the same incorrect letter over and over should not cause any more body parts to show). d. Ask the user if they want to play again. If they do, reset the guess phrase to a new phrase and reset the rest of the game.
3. EXTRA CREDIT: Add comments for correct/incorrect answers. NOTE: You can use two files for this and reuse your RandomString class from Project 5. Display a corresponding comment from the person being hung, negative if the user/player guessed wrong, positive or encouraging if the user/player got it right.
4. Be sure to comment everything a. Each of your methods (including their parameters). b. Anything else that needs explanation.
5. You MUST do the following also: a. You must name the file with your guess phrases: “guess_phrases.txt” b. Submit a runnable JAR file. See the hints below that tell you how to do this. This JAR file is basically an executable that you will be able to double click to launch your program. Note: you will still need to have your "guess_phrases.txt" file in the same directory as your JAR file
6. Be sure to: a. Use proper indentation b. Use appropriate variable/field names c. Group like things together (items that are part of the same objects) d. Use appropriate comments – including comments for each method e. Check your curly braces
7. For this project you will submit the following (see “Saving and Submitting your Work” for details): a. A general archive file (e.g. a zip) b. A runnable JAR file c. At least one JPG showing your application Hints / tips • For the comments positive and negative you can reuse your RandomString class from Project 5 • When incorporating multiple panels in a single frame, you will need to set a layout scheme. • As part of project 6 you need to make the logic of the game work properly as well as ask the user if they would like to play again. You may find it useful to use the following logic: if person or phrase is revealed process the user's Y/N answer else process the input as usual for the game, updating the person, guess phrase panel, & alphabet panel as appropriate if person or phrase is revealed ask the user if they would like to play again • To create a runnable JAR file: o Follow the saving and submitting instructions to create a runnable JAR and make sure you select the HangmanGame class as your launch configuration. o Upload the runnable JAR file as an attachment to your project submission, so your project submission should have at least 3 files: an archive file, a runnable JAR file, and an image of your game (perhaps part way through a game).
Décerné à :
5 freelance font une offre moyenne de $106 pour ce travail
I'm a certified java programmer, can dedicate myself full time to this project and have long experience with java development. I can surely help.