Reflect in ePortfolio Download Print Open with docReader Project Two Guidelines and Rubric You have viewed this topic Last Visited Oct 5, 2021 5:15 PM Competencies In this project, you will...

1 answer below »
I have a project that needs to be completed all in PyCharm. I have attached the rubric that needs very close looking at as it is VERY SPECIFIC. I also have two labs that i need done AND ENETERED IN MY ZY BOOKS. My username is [email protected] and my password is Whiskeybear123


Reflect in ePortfolio Download Print Open with docReader Project Two Guidelines and Rubric You have viewed this topic Last Visited Oct 5, 2021 5:15 PM Competencies In this project, you will demonstrate your mastery of the following competencies: Write scripts using syntax and conven!ons in accordance with industry standard best prac!ces Develop a fully func!onal program using industry-relevant tools Scenario You work for a small company that creates text-based games. You recently pitched your design ideas for a text-based adventure game to your team. Your team was impressed by all of your designs, and would like you to develop the game! You will be able to use the map and the pseudocode or flowcharts from your designs to help you develop the code for the game. In your code, you have been asked to include clear naming conven!ons for func!ons, variables, and so on, along with in-line comments. Not only will these help you keep track as you develop, but they will help your team read and understand your code. This will make it easier to adapt for other games in the future. Recall that the game requires players to type in a command line prompt to move through the different rooms and get items from each room. The goal of the game is for the player to get all of the items before encountering the room that contains the villain. Each step of the game will require a text output to let the player know where they are in the game, and an op!on of whether or not to obtain the item in each room. Direc!ons In Project One, you designed pseudocode or flowcharts for the two main ac!ons in the game: moving between rooms and gathering items. In this project, you will write the code for the full game based on your designs. You will also need to include some addi!onal components beyond your original designs to help your game work as intended. You will develop all of your code in one Python (PY) file, !tled “TextBasedGame.py.” IMPORTANT: The direc!ons include sample code from the dragon-themed game. Be sure to modify any sample code so that it fits the theme of your game. 1. First, create a new file in the PyCharm integrated development environment (IDE), !tle it “TextBasedGame.py,” and include a comment at the top with your full name. As you develop your code, remember that you must use industry standard best prac!ces including in-line comments and appropriate naming conven!ons to enhance the readability and maintainability of the code. 2. In order for a player to navigate your game, you will need to develop a func!on or func!ons using Python script. Your func!on or func!ons should do the following: Show the player the different commands they can enter (such as “go North”, “go West”, and “get [item Name]”). Show the player’s status by iden!fying the room they are currently in, showing a list of their inventory of items, and displaying the item in their current room. You could make these separate func!ons or part of a single func!on, depending on how you prefer to organize your code. #Sample function showing the goal of the game and move commands def show_instructions(): #print a main menu and the commands print("Dragon Text Adventure Game") print("Collect 6 items to win the game, or be eaten by the dragon.") print("Move commands: go South, go North, go East, go West") print("Add to Inventory: get 'item name'") #In this solution, the player’s status would be shown in a separate function. #You may organize your functions differently. 3. Next, begin developing a main func!on in your code. The main func!on will contain the overall gameplay func!onality. Review the Project Two Sample Text Game Flowchart, located in the Suppor!ng Materials sec!on, to help you visualize how main() will work. For this step, simply add in a line of code to define your main func!on, and a line at the end of your code that will run main(). You will develop each of the pieces for main() in Steps #4–7. 4. In main(), create a dic!onary linking rooms to one another and linking items to their corresponding rooms. The game needs to store all of the possible moves per room and the item in each room in order to properly validate player commands (input). This will allow the player only to move between rooms that are linked or retrieve the correct item from a room. Use your storyboard and map from Project One to help you create your dic!onary. Here is an example of a dic!onary for a few of the rooms from the sample dragon text game. #A dictionary linking a room to other rooms #and linking one item for each room except the Start room (Great Hall) and the room containing the villain rooms = { 'Great Hall' : { 'South' : 'Bedroom', 'North': 'Dungeon', 'East' : 'Kitchen', 'West' : 'Library' }, 'Bedroom' : { 'North' : 'Great Hall', 'East' : 'Cellar', 'item' : 'Armor' }, 'Cellar' : { 'West' : 'Bedroom', 'item' : 'Helmet' }, 'Dining Room' : { 'South' : 'Kitchen', 'item' : 'Dragon' } #villain } #The same pattern would be used for the remaining rooms on the map. 5. The bulk of the main func!on should include a loop for the gameplay. In your gameplay loop, develop calls to the func!on(s) that show the player’s status and possible commands. You developed these in Step #2. When called, the func!on(s) should display the player’s current room and prompt the player for input (their next command). The player should enter a command to either move between rooms or to get an item, if one exists, from a room. Here is a sample status from the dragon text game: You are in the Dungeon Inventory: [] You see a Sword ---------------------- Enter your move: As the player collects items and moves between rooms, the status func!on should update accordingly. Here is another example a#er a player has collected items from two different rooms: You are in the Gallery Inventory: [‘Sword’, ‘Shield’] -------------- Enter your move: Note: If you completed the Module Six milestone, you have already developed the basic structure of the gameplay loop, though you may not have included func!ons. Review any feedback from your instructor, copy your code into your “TextBasedGame.py” file, make any necessary adjustments, and finish developing the code for the gameplay loop. 6. Within the gameplay loop, you should include decision branching to handle different commands and control the program flow. This should tell the game what to do for each of the possible commands (inputs) from the player. Use your pseudocode or flowcharts from Project One to help you write this code. What should happen if the player enters a command to move between rooms? What should happen if the player enters a valid command to get an item from the room? Be sure to also include input valida!on by developing code that tells the program what to do if the player enters an invalid command. Note: If you completed the Module Six milestone, you have already developed a por!on of this code by handling “move” commands. Review any feedback from your instructor, copy your code into your “TextBasedGame.py” file, make any necessary adjustments, and finish developing the code. 7. The gameplay loop should con!nue looping, allowing the player to move to different rooms and acquire items un!l the player has either won or lost the game. Remember that the player wins the game by retrieving all of the items before encountering the room with the villain. The player loses the game by moving to the room with the villain before collec!ng all of the items. Be sure to include output to the player for both possible scenarios: winning and losing the game. Hint: What is the number of items the player needs to collect? How could you use this number to signal to the game that the player has won? Here is a sample from the dragon text game of the output that will result if the player wins the game: Congratulations! You have collected all items and defeated the dragon! Thanks for playing the game. Hope you enjoyed it. If the player loses the game, they will see the following output: NOM NOM...GAME OVER! Thanks for playing the game. Hope you enjoyed it. Note: If you completed the Module Six milestone, the gameplay loop ended through the use of an “exit” room. You will need to remove the “exit” room condi!on and adjust the code so that the game ends when the player either wins or loses, as described above. 8. As you develop, you should be sure to debug your code to minimize errors and enhance func!onality. A#er you have developed all of your code, be sure to run the code and use the map you designed to navigate through the rooms, tes!ng to make sure that the game is working correctly. Be sure to test different scenarios such as the following: What happens if the player enters a valid direc!on? Does the game move them to the correct room? When the player gets an item from a room, is the item added to their inventory? What happens if the player enters an invalid direc!on or item command? Does the game provide the correct output? What happens if the player wins the game? What happens if the player loses the game? What to Submit To complete this project, you must submit the following: TextBasedGame.py Develop and submit the “TextBasedGame.py” file using PyCharm. Include your full name in a comment at the top of the code. Be sure to submit the code that you have completed, even if you did not finish the full game. Suppor!ng Materials The following resources may help support your work on the project: Video: Sample Dragon Text Game Walkthrough (8:24) This video shows a sample dragon-themed text game. There is a brief descrip!on of the game, as well as a video that shows the game running and a player moving through different rooms and gathering items based on the commands. Review this video to help you understand how a text-based adventure game works. A video transcript is available: Transcript for Sample Dragon Text Game Walkthrough. Reading: Project Two Sample Text Game Flowchart This flowchart outlines a sample design for the whole text-based game. The “Get Item” and “Move Between Rooms” processes are inten!onally vague
Answered 1 days AfterOct 14, 2021

Answer To: Reflect in ePortfolio Download Print Open with docReader Project Two Guidelines and Rubric You have...

Sathishkumar answered on Oct 16 2021
140 Votes
#Created instructions for Player
def show_instructions():
#print a main menu and the commands

print("*********Dragon Text Adventure Game*************")
print("---->Collect 4 items to win the game, or be eaten by the dragon.")
print("Move commands: South, North, East, West")
print("Add to Inventory: type get ")
show_instructions()
#Created Blueprint for Game Area and Rewards
rooms = {
'Great Hall' : { 'South' : 'Bedroom', 'North': 'Dungeon', 'East' : 'Kitchen', 'West' : 'Library' },
'Bedroom' : { 'North' : 'Great Hall', 'East' : 'Cellar'},
'Cellar' : { 'West' : 'Bedroom', 'item' : 'Helmet' },
'Kitchen' :{'North' :'Dining Room' ,'West' :'Great Hall','item' : 'Knife'},
'Library' :{'East' : 'Great...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here