subject

In PyCharm, create a new code file titled “ModuleSixMilestone. py.” At the top of the file, include a comment with your name. As you develop your code, you must use industry-standard best practices, including in-line comments and appropriate naming conventions, to enhance the readability and maintainability of the code. Next, copy the following dictionary into your PY file. This dictionary links rooms to one another and will be used to store all possible moves per room, in order to properly validate player commands (input). This will allow the player to move only between rooms that are linked.

Note: For this milestone, you are being given a dictionary and map for a simplified version of the dragon-themed game. Make sure to read the code carefully so that you understand how it works. In Project Two, you will create your own dictionary based on your designs.
#A dictionary for the simplified dragon text game
#The dictionary links a room to other rooms.
rooms = {
'Great Hall': {'South': 'Bedroom'},
'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
'Cellar': {'West': 'Bedroom'}
}
A portion of the map for the Dragon Text Game showing the Great Hall, Bedroom, and Cellar, with arrows indicating the directions the player can move between them. The Cellar is to the East of the Bedroom, which is to the South of the Great Hall.
Next, you will develop code to meet the required functionality, by prompting the player to enter commands to move between the rooms or exit the game. To achieve this, you must develop the following:
A gameplay loop that includes:
Output that displays the room the player is currently in
Decision branching that tells the game how to handle the different commands. The commands can be to either move between rooms (such as go North, South, East, or West) or exit.
If the player enters a valid “move” command, the game should use the dictionary to move them into the new room.
If the player enters “exit,” the game should set their room to a room called “exit.”
If the player enters an invalid command, the game should output an error message to the player (input validation).
A way to end the gameplay loop once the player is in the “exit” room
TIP: Use the pseudocode or flowchart that you designed in Step #4 of Project One to help you develop your code.
As you develop, you should debug your code to minimize errors and enhance functionality. After you have developed all of your code, be sure to run the code to test and make sure it is working correctly.
What happens if the player enters a valid direction? Does the game move them to the correct room?
What happens if the player enters an invalid direction? Does the game provide the correct output?
Can the player exit the game?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
You know the right answer?
In PyCharm, create a new code file titled “ModuleSixMilestone. py.” At the top of the file, include...
Questions
question
Health, 02.07.2019 19:20
question
Mathematics, 02.07.2019 19:30
Questions on the website: 13722362