Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project 3 Where's Carmen Due Date: Tuesday, May 1 4 th , 2 0 2 4 by 1 1 : 5 9 : 5 9
Project Where's Carmen Due Date: Tuesday, May th by :: PM Value: points Notice the due date is Tuesday the last day of classes There cannot be any extensions after this date. This assignment falls under the standard cmsc academic integrity policy. This means you should not discussshowcopydistribute your solutions, your code or your main ideas for the solutions to any other student. Also, you should not post these problems on any forum, internet solutions website, etc. Make sure that you have a complete file header comment at the top of each file, and that all of the information is correctly filled out. File: FILENAME.py Author: YOUR NAME Date: THE DATE Section: YOUR DISCUSSION SECTION NUMBER Email: YOUREMAIL@umbc.edu Description: DESCRIPTION OF WHAT THE PROGRAM DOES Submission Details Submit the files under the following title: These are case sensitive as usual. submit cmsc PROJECT carmen.py Project Description Back in the glorious days of the s there was a game called Carmen Sandiego. Your goal was to find her. You would search places and look for clues, talk to people and eventually find her. In this version of the game you will load a json file with all of the game data. This will have all the locations, and the connections between them. There are also people and clues that you can investigate and talk to in each of the places. As you talk to people or get clues it will unlock locations. The locations will be in a network, ie you can get from some places to others, but you must be able to access the location from where you currently are, and the places must be unlocked so that you can transit through them. This is where the recursion for the project comes in You must be able to determine given a starting and ending location if there is a path of unlocked regions. If there is then the player can get from the start to the end, otherwise they must unlock more clues and talk to more people, who will unlock more regions. Implementation Details I will provide starter code in the form of a short function that loads the game dictionary from the file. The dictionary will be of this form: game 'locations': a dictionary of locations 'people': a dictionary of people 'clues': a dictionary of clues 'startinglocation': 'a location name as a string' The locations dictionary will be of this form the places are just an example but the : locations 'Rome': connections : Cardiff 'London' 'startslocked': True or False, 'carmen': True or False 'Cardiff': 'London': 'Svalbard': Each location will have a connections list of strings with the locations that you can go to if they are unlocked. 'startslocked' is a boolean with whether the game starts this location as locked, meaning you can travel there without gathering any clues or talking to anyone. Finally 'carmen' is a boolean that is only true for one location, wherever Carmen is Each location is the same, except with different connection lists and different booleans. people is a dictionary with these features. The dictionary keys are the names of the people, capitalized you can use the python string function capitalize to ensure that the names are in the same case as names that are entered. "Henri": "location": "Paris", "conversation": An investigator in London named James has a clue for you. "startshidden": true, "unlocklocations": London "unlockpeople": James "unlockclues": You must be in the proper location to talk with the person but they do not need to be unhidden. If you guess their name, you can talk with them even if you can't see them on the list of people yet. If you talk with them, print out the conversation text that they have, and then unlock the locations, people and clues that are given in the lists. "BrandenburgGate": location: "Berlin", "cluetext": "A note was left in cyrillic with the MoscowSheremetyevo airport. "startshidden": true, "unlocklocations": Moscow "unlockpeople": Viktor "unlockclues": Similarly with clues, investigating a clue can be done even if the clue is still hidden, but the player doesn't know what it is called so they'd have to guess. If they investigate that clue, then display the cluetext to the player and unlock the locations, people and clues that are given in the dictionary.
Project
Where's Carmen
Due Date: Tuesday, May th by :: PM
Value: points
Notice the due date is Tuesday the last day of classes There cannot be any extensions after this date.
This assignment falls under the standard cmsc academic integrity policy. This means you should not discussshowcopydistribute your solutions, your code or your main ideas for the solutions to any other student. Also, you should not post these problems on any forum, internet solutions website, etc.
Make sure that you have a complete file header comment at the top of each file, and that all of the information is correctly filled out.
File: FILENAME.py
Author: YOUR NAME
Date: THE DATE
Section: YOUR DISCUSSION SECTION NUMBER
Email: YOUREMAIL@umbc.edu
Description:
DESCRIPTION OF WHAT THE PROGRAM DOES
Submission Details
Submit the files under the following title:
These are case sensitive as usual.
submit cmsc PROJECT carmen.py
Project Description
Back in the glorious days of the s there was a game called Carmen Sandiego. Your goal was to find her. You would search places and look for clues, talk to people and eventually find her.
In this version of the game you will load a json file with all of the game data. This will have all the locations, and the connections between them.
There are also people and clues that you can investigate and talk to in each of the places. As you talk to people or get clues it will unlock locations.
The locations will be in a network, ie you can get from some places to others, but you must be able to access the location from where you currently are, and the places must be unlocked so that you can transit through them. This is where the recursion for the project comes in You must be able to determine given a starting and ending location if there is a path of unlocked regions. If there is then the player can get from the start to the end, otherwise they must unlock more clues and talk to more people, who will unlock more regions.
Implementation Details
I will provide starter code in the form of a short function that loads the game dictionary from the file.
The dictionary will be of this form:
game
'locations': a dictionary of locations
'people': a dictionary of people
'clues': a dictionary of clues
'startinglocation': 'a location name as a string'
The locations dictionary will be of this form the places are just an example but the :
locations
'Rome': connections : Cardiff 'London'
'startslocked': True or False,
'carmen': True or False
'Cardiff':
'London':
'Svalbard':
Each location will have a connections list of strings with the locations that you can go to if they are unlocked. 'startslocked' is a boolean with whether the game starts this location as locked, meaning you can travel there without gathering any clues or talking to anyone. Finally 'carmen' is a boolean that is only true for one location, wherever Carmen is Each location is the same, except with different connection lists and different booleans.
people is a dictionary with these features. The dictionary keys are the names of the people, capitalized you can use the python string function capitalize to ensure that the names are in the same case as names that are entered.
"Henri": "location": "Paris",
"conversation": An investigator in London named James has a clue for you.
"startshidden": true,
"unlocklocations": London
"unlockpeople": James
"unlockclues":
You must be in the proper location to talk with the person but they do not need to be unhidden. If you guess their name, you can talk with them even if you can't see them on the list of people yet.
If you talk with them, print out the conversation text that they have, and then unlock the locations, people and clues that are given in the lists.
"BrandenburgGate": location: "Berlin",
"cluetext": "A note was left in cyrillic with the MoscowSheremetyevo airport.
"startshidden": true,
"unlocklocations": Moscow
"unlockpeople": Viktor
"unlockclues":
Similarly with clues, investigating a clue can be done even if the clue is still hidden, but the player doesn't know what it is called so they'd have to guess. If they investigate that clue, then display the cluetext to the player and unlock the locations, people and clues that are given in the dictionary.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started