At the end of this problem you should submit to Laulima (please zip these files to work around the 5 file limit):
- a file named UHusername_display_highscore.c
- a file named UHusername_display_highscore.h
- a file named UHusername_display_highscore_constants.h
- a file named UHusername_display_highscore_helpers.c
- a file named UHusername_display_highscore_helpers.h
- a file named UHusername_display_highscore_setup.h
example:
- zhaol_display_highscore.c
- zhaol_display_highscore.h
- zhaol_display_highscore_constants.h
- zhaol_display_highscore_helpers.c
- zhaol_display_highscore_helpers.h
- zhaol_display_highscore_setup.h
-
Update the display program that you completed from Lab 09
It will be beneficial for you to leave your previous lab work untouched by copying them to a new folder for this lab and modify only the files in the new folder
If you were not able to complete Display with Attacker and Teleport from the Lab 09, you can modify a fresh copy of the display program. The feature set between both lab assignments are independent. Just follow the download instructions from Lab 08 and coordinate with your lab instructor.
Update your Display with Attacker and Teleport program from Lab 09 to add the following features:
-
Implement a high score feature:
- each time the token moves "on top" of an item, increment the score by 1
- when an attacker moves "on top" of the token, the game ends
- when the game ends, the current score is compared with the high score
- the high score is read/written to a file for persistence, i.e. the high score can be retrieved after the program ends
- if the current score is greater than the high score, then the program will ask the user for his/her name and stores the user's name and high score to the file
- if you were not able to get the item and attacker to work, then:
- increment the score each time the token is at one of the 4 corners of the screen
- the game ends when the token is at a particular "trap" position, you can choose the "trap" position or make the "trap" position be random
-