Dragon Slayer Objective: To design a game In this assignment, you will design a

Dragon Slayer Objective: To design a game In this assignment, you will design a game. The objective of the game is to defeat a dragon that has been lurking villagers from the nearby town. To succeed, the character will need equip itself with a sword and a shield. Both items got lost in time. The mission of the game is to find and acquire both sacred tools to stop the nightmare of the fearsome monster. Drag Description: In order for the character to discover its surroundings, he/she will move one block left, right, up, or down from its current position. For simplicity, you should model the world as a 2-D dungeon in which every cell could represent either: a) an empty room, b) a room with a lesser monster guarding either the shield OR the sword, or c) a room guarded by the terrible dragon. The character will always start this dangerous quest in the most upper-left cell (in other words, cell (0,0)) and will move across the dungeon one cell at a time. Mandatory methods Your solution must include the following methods: A method to display a menu for moving in the dungeon This method should display the text Table 2. Actions: Main actions. A method to display a menu when encountering the monsters This method should display the text Table 5. Actions: Facing an enemy. A method to validate if option entered by user is valid when encountering a monster This method should return true if the option entered by the user is valid (‘a’, ‘b’, ‘c’, ‘A’, ‘B’, ‘C’), and false otherwise. A method to validate if option entered by user is valid when moving in the dungeon This method should return true if the option entered by the user is valid (‘u’, ‘d’, ‘l’, ‘r’, ‘U’, ‘D’, ‘L’, ‘R’), and false otherwise. Reusing methods This assignment contains a predefined method that will randomly place monsters and the dragon in the dungeon every time the game is executed. You should reuse this method in your code. —————————————————————————- Start of the game The user will be located in cell 0,0, this room is guaranteed to always be an empty room. The game will then display text from Table 1. Game introduction and Table 2. Actions: Main actions. Oh no! A dragon is killing our sheep and scaring our villagers, please help the knight put a stop to this nightmare! Table 1. Game introduction You are in cell *row,column* Your remaining health points are: *hp* Shield acquired: *shield acquired status* Sword acquired: *sword acquired status* Where would you like to move now? Use L to move left Use R to move right Use U to move up Use D to move down Table 2. Actions: Main actions If the character enters an empty room The game will display text from Table 3. Empty room text and Table 2. Actions: Main actions. You have entered an empty room, looks like there’s nothing to do here. Table 3. Empty room text If the character enters a room with a lesser monster guarding either the shield OR the sword The game will display Table 4. Shield/sword found and Table 5. Actions: Facing an enemy. The user will then have three options: Do nothing The game will display text from Table 6. Do nothing: shield/sword and Table 5. Actions: Facing an enemy. • One health point is taken out. • If HP reaches zero, the game ends and the text Table 7. Game over should be displayed. Hit the enemy The game will display text from Table 8. Hit the enemy: shield/sword and Table 2. Actions: Main actions. • One health point is taken out. • If HP reaches zero, the game ends and the text Table 7. Game over should be displayed. • The enemy is destroyed, and the user acquires either the shield or the sword. Run away The game will display the text Table 9. Run away, HP will remain the same for both the enemy guarding the shield/sword and the user, the user will be located in the previous room, and text Table 2. Actions: Main actions will be displayed. The mythical *item* is located in this room! A monster is guarding it. Table 4. Shield/sword found What would you like to do: a) Do nothing b) Hit the enemy c) Run away Table 5. Actions: Facing an enemy You have chosen to do nothing. The monster hit you. Your remaining health points are: *hp* Table 6. Do nothing: shield/sword Game over… Table 7. Game over You have chosen to hit the monster. The monster hit you. You have defeated the monster and acquired the *item*! Table 8. Hit the enemy: shield/sword You have chosen to run away. Table 9. Run away If the character enters a room with the dragon The game will display Table 10. Dragon room and Table 5. Actions: Facing an enemy. The user will then have three options: Do nothing If the user has not acquired both the shield AND the sword • HP will be reduced to zero • The game will end • Display the text Table 11. Do nothing: dragon 1 and Table 7. Game over If the user has both the shield AND the sword • Two health points will be subtracted from the user’s HP • If HP reaches zero, the game ends and the text Table 12. Do nothing: dragon 2 and Table 7. Game over will be displayed. • Else, the text Table 12. Do nothing: dragon 2 and Table 5. Actions: Facing an enemy will be displayed Hit the enemy If the user has not acquired the shield AND the sword • HP will be reduced to zero • The game will end • Display the text Table 13. Hit the dragon 1 and Table 7. Game over If the user has both the shield AND the sword • Two health points will be subtracted from the user’s HP • If HP reaches zero, the game ends and the text Table 14. Hit the dragon 2, Table 16. Hit the dragon 4, and Table 7. Game over will be displayed. • Else, the text Table 14. Hit the dragon 2, Table 15. Hit the dragon 3, and Table 7. Game over will be displayed Run away The game will display the text Table 9. Run away, HP will remain the same for both the dragon and the user, the user will be located in the previous room, and text Table 2. Actions: Main actions will be displayed. The dragon is located in this room! Table 10. Dragon room You have chosen to do nothing. You are missing the *item (sword and/or shield)*. The dragon killed you… Table 11. Do nothing: dragon 1 You have chosen to do nothing. The dragon hit you. Your remaining health points are: *HP* Table 12. Do nothing: dragon 2 You have chosen to hit the dragon. You are missing the *item (sword and/or shield)* The dragon killed you… Table 13. Hit the dragon 1 You have chosen to hit the dragon. The dragon hit you. You have defeated the dragon! Table 14. Hit the dragon 2 Congratulations, you have survived this quest! Table 15. Hit the dragon 3 You have saved the village but died in the process Table 16. Hit the dragon 4

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount