Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

226 CS205

IT 140 Project Two Guidelines and Rubric

Competencies

In this project, you will demonstrate your mastery of the following competencies:

· Write scripts using syntax and conventions in accordance with industry standard best practices

· Develop a fully functional 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 conventions for functions, 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 option of whether or not to obtain the item in each room.

Directions

In Project One, you designed pseudocode or flowcharts for the two main actions 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 additional components beyond your original designs to help your game work as intended. You will develop all of your code in one Python (PY) file, titled “TextBasedGame.py.”

IMPORTANT: The directions 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), title 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 practices including in-line comments and appropriate naming conventions 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 function or functions using Python script. Your function or functions 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 identifying 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 functions or part of a single function, 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 function in your code. The main function will contain the overall gameplay functionality. Review the Project Two Sample Text Game Flowchart, located in the Supporting Materials section, to help you visualize how main() will work.

For this step, simply add in a line of code to define your main function, 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 dictionary 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 dictionary.
Here is an example of a dictionary for a few of the rooms from the sample dragon text game.

5. #A dictionary linking a room to other rooms

6. #and linking one item for each room except the Start room (Great Hall) and the room containing the villain

7. rooms = {

8. ‘Great Hall’ : { ‘South’ : ‘Bedroom’, ‘North’: ‘Dungeon’, ‘East’ : ‘Kitchen’, ‘West’ : ‘Library’ },

9. ‘Bedroom’ : { ‘North’ : ‘Great Hall’, ‘East’ : ‘Cellar’, ‘item’ : ‘Armor’ },

10. ‘Cellar’ : { ‘West’ : ‘Bedroom’, ‘item’ : ‘Helmet’ },

11. ‘Dining Room’ : { ‘South’ : ‘Kitchen’, ‘item’ : ‘Dragon’ } #villain

12. }

#The same pattern would be used for the remaining rooms on the map.

13. The bulk of the main function should include a 
loop for the gameplay. In your gameplay loop, 
develop calls to the function(s) that show the player’s status and possible commands. You developed these in Step #2. When called, the function(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:

14. You are in the Dungeon

15. Inventory: []

16. You see a Sword

17. ———————-

18. Enter your move:

As the player collects items and moves between rooms, the status function should update accordingly. Here is another example after 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 functions. 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.

19. 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 validation 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 portion 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.

20. The 
gameplay loop should continue looping, allowing the player to move to different rooms and acquire items until 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 collecting 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:

21. 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 condition and adjust the code so that the game ends when the player either wins or loses, as described above.

22. As you develop, you should be sure to 
debug your code to minimize errors and enhance functionality. After you have developed all of your code, be sure to run the code and use the map you designed to navigate through the rooms, testing 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 direction? 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 direction 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.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Information Systems Assignment1

Find the details in the attached file. UU-MBA-740-ZM Web design and development Assignment 1 Dear students, This is your first assignment for this course that accounts for 50% of your total marks for the course. Please answer and elaborate on the following questions: 1. What do you need to take

V

Risk mitigation, which is part of the risk management plan, takes place once you have identified and analyzed your risks. Risk mitigation is identifying the strategies you are going to use to accept, avoid, share/reduce, or work around the identified and analyzed risks. Which of the seven domains do you

SLP 3 – 40

Please help me Module 3 – SLP Database Applications Recall that for the SLP assignment for this course, we are conducting assessments of database programs and demonstrations available online. For this SLP review the tutorial  Microsoft SQL Server 2022 Essential Training  from LinkedIn Learning.  Once you have completed your exploration

Case 3 – 40

I need help Module 3 – Case Database Applications Assignment Overview Computer supported collaborative work (CSCW) was developed to support teams by providing team members with powerful and convenient ways to schedule their interactions, communicate with each other, and record and update group output. Much of the early research in

SLP 2 – 40

help with homework Module 2 – SLP Database Management Recall that for the SLP assignment for this course, we are conducting assessments of database programs and demonstrations available online. For this module, your task is to try the tutorial  Learning SQL Programming  from LinkedIn Learning.   The more of the

Case 2 – 40

help pls Module 2 – Case Database Management Assignment Overview The Case Assignment for this module revolves around the question of large-scale data and the implications of database capabilities for organizational data management. As we’ve said, the change from data as a scarce resource to data as overabundance is still

SLP 4 – 24

I need help please Module 4 – SLP Strategic Portfolio Management Often best practices in the workplace lag behind technology advances. Ethical principles and best practices must be constantly reviewed and deeply considered in the workplace. Social media have had a big impact particularly on the Digital Native (those born

INFA PROJECT 4 PRIVACY COMPLIANCE

   For this project, you will leverage your research from Projects #1, #2, and #3 to develop a privacy compliance strategy for your chosen company. The deliverable for this project will be a Privacy Compliance Strategy that includes a legal and regulatory analysis for privacy laws and regulations. The scope

INFA PROJECT 3 RISK MITIGATION

 For this project, you will leverage your research from Project #1 and analysis from Project #2 to develop a risk mitigation strategy for your chosen company. If necessary, you can adjust your Information Usage Profile or your Risk Profile using feedback from your instructor and additional information from your readings

Case 4 – 24

I need help Module 4 – Case Strategic Portfolio Management Assignment Overview While some refer to Web 2.0/Web 3.0 as jargon, it has come to symbolize the sharing economy and the ability of people and businesses to interact with each other, forming virtual relationships. These virtual relationships include social media,

SLP 3 – 24

Help please Module 3 – SLP IT Governance Dashboards, which display data using graphics, have become commonplace. They are used for many applications, such as showing voter turnout in different states during national elections. The first informational dashboards were used in early automobiles and featured gauges to indicate speed and

case 3 – 24

help please Module 3 – Case IT Governance Assignment Overview Many firms are using Big Data to power their decision making. Here is a chance to see how firms are using Big data and how it impacts their decision making. Case Assignment For Big Data, find a case study and

SLP 4 -17

I NEED HELP Module 4 – SLP Managing and Assessing Information Security Policy Using a graphics program, design several security awareness posters on the following themes: updating antivirus signatures, protecting sensitive information, watching out for e-mail viruses, prohibiting the personal use of company equipment, changing and protecting passwords, avoiding social

case 3 – 17

i need help Module 3 – Case Security Laws and Standards Assignment Overview Employees must be trained and kept aware of topics related to information security, not the least of which is the expected behaviors of an ethical employee. This is especially important in information security, as many employees may

Case 4 – 17

Need help Module 4 – Case Managing and Assessing Information Security Policy Assignment Overview The Information Security Blueprint is the basis for the design, selection, and implementation of all security program elements. The blueprint builds on top of the organization’s information security policies and it is a scalable, upgradable, comprehensive plan

III

See attached The purpose of the PowerPoint presentation is to show threats, vulnerabilities, and recommendations in an affinity diagram. An example of this diagram is provided in your textbook in Chapter 4. As a risk management project manager, you must identify the threats, vulnerabilities, and recommendations for ABC IT Organization’s

Help with system change course

· What do critical pragmatism, improvement research, and democracy have to do with each other? · How do you make sense of your personal epistemology / worldview and improvement science? · Improvement science focuses on being problem focused and user centered, but it also uses methods and theory responsibly and

Coding for Musculoskeletal Services

  You are a new medical coder that works for an Orthopedic medical practice. Patients are often seen for fractures or dislocations which require either a cast or splint. A common patient encounter may be for the application of a long-arm split. Apply your knowledge of CPT to this patient