INFO1110 / COMP9001
Goosechasers: A Titled Goose Game
Milestone Deadline: 11:59 PM Monday, 28th October 2019 AEST (Week 12)
Final Deadline: 11:59 PM Monday, 4th November 2019 AEST (Week 13)
Weighting: 10% of the ﬁnal assessment mark.
You are a goose. Beautiful. Majestic. Unstoppable. In the wake of your majesty, even the most
intense of human passions are but ﬂeeting whispers in comparison – for not only are you a
goose, you are the Goose: Her Excellency, Duchess Hilda von Goosensmirch the Red, Countess of
Loch Lanore and Grandmaster of the Order of the Silver Leek. There are those, however, that
claim to see you for what you truly are: a terror to society; an agent of chaos – an avatar of
The Goosechasers, as they call themselves, belong to a nefarious order of humans (and human-
adjacent creatures) dedicated to your capture and suppression. Thanks to an unfortunate series
of events, you, Duchess Hilda von Goosensmirch the Red, Countess of Loch Lanore and
Grandmaster of the Order of the Silver Leek, have been cornered by one or more of these
Goosechasers – a scenario most sub-optimal for you and yours.
You are, of course, a goose, and in all your wisdom and majesty, are privy to many a means of
response to this situation. Perhaps you are feeling merciful, and simply wish to evade the
Goosechasers until they are no longer a problem – or perhaps you have suﬀered their existence
long enough, and must remind them that they have no right to encroach upon your domain.
For this assignment, you will write a game that simulates a wild goose chase. The player will
control a goose – a creature – that moves from one location to another, while avoiding other
creatures that wish to harm it. The goose may attempt to frighten other creatures into running
away (permanently) by honking at them, though some creatures will be more diﬃcult to frighten
than others. If the goose is caught by another creature that it cannot frighten, the player loses. If
the goose successfully navigates to a location that allows it to ﬂee from the other creatures, or
successfully frightens away all other creatures on the map, the player wins.
Your program will be written in Python 3. The only Python module that you are allowed to import
is sys. To help you begin, a scaﬀold has been provided. This scaﬀold consists of the following
game.py, which should contain the main body of your program.
creature_test.py (only relevant to ﬁnal submission; see page 29 for details)
Your entire program must be contained in these ﬁles. It is recommended that you implement the
functions in these ﬁles to the best of your ability, and use them to help you complete the
assignment. You may create new functions as you see ﬁt.
Additionally, a few sample conﬁguration ﬁles have been given to help you start up your program.
Help and feedback
Please ensure your code is comprehensible before requesting feedback. We recommend that
Staﬀ may make announcements on Ed regarding any updates or clariﬁcations to the assignment.
You can ask questions on Ed using the assignments category. Please read this assignment
description carefully before asking questions. Please ensure that your work is your own and you
do not share any code or solutions with other students.
each submission, the marking system will automatically check your code against public test
These public tests do not cover all parts of the speciﬁcation and your code. The complete test
suite contains both public and hidden test cases, and your code will not be run through this suite
until after the assignment deadline.
Please ensure you carefully follow the assignment speciﬁcation. Your program output must
exactly match the output shown in the examples.
Warning: Any attempts to deceive or disrupt the marking system will result in an immediate zero
for the entire assignment. Negative marks can be assigned if you do not properly follow the
assignment speciﬁcations, or your code is unnecessarily or deliberately obfuscated.
To ensure you are making regular progress on this assignment, you must have achieved a
minimum level of functionality in your submission by October 28th, 11:59 PM AEST (Week 12
Monday) to receive a portion of the marks. See the Milestone Submission section at the end of this
document for further details.
The program will be given 4 extra command line arguments when it is run:
python3 game.py <PATHS> <ITEMS> <CHASERS> <EXITS>
These arguments (let’s call them conﬁguration ﬁles) will be used to generate Location, Item,
and Creature objects that you will need to run your program. The Location, Item, and Creature
classes are to be deﬁned in the location.py, item.py, and creature.py ﬁles, respectively, and
the speciﬁcation for these are available in the Classes section on page 6 onwards.
Examples of these conﬁguration ﬁles are available in the provided scaﬀold; check for the ﬁles
sample_paths.txt, sample_items.txt, sample_chasers.txt, and sample_exits.txt Empty lines
encountered in any conﬁguration ﬁle can be safely skipped and ignored.
If fewer than 4 arguments are supplied, print: “Usage: python3 game.py <PATHS> <ITEMS>
<CHASERS> <EXITS>” and exit the program.
Of the given arguments, you can expect that they will all be paths to a ﬁle (and/or the name of a
ﬁle). If any one of the ﬁles speciﬁed by the arguments do not exist, print: “You have
specified an invalid configuration file.” and exit the program.
The ﬁrst argument, <PATHS>, should be the name of a ﬁle containing a list of all connections
between Locations in the program. You can use this ﬁle to generate Location objects as deﬁned
on page 6. Each line is of the form:
START > DIRECTION > DESTINATION
Where START and DESTINATION are the names of Location objects, and DIRECTION indicates a
direction on the compass (northwest, north, northeast, east, southeast, south, southwest, west)
that a creature must travel towards in order to move between START and DESTINATION. For
Lake > northeast > Trail
Trail > SOUTH > Gazebo
If a Creature is currently at the Lake, it can move NORTHEAST to arrive at the Trail. Similarly, if a
Creature is currently on the Trail, it can travel SOUTH in order to arrive at the Gazebo.
Paths do not need to be reﬂective – going north in location A and immediately going back south
does not have to lead you back to location A. This is a game, so some paths might not make
sense, and that’s ok! For example:
Lake > NORTH > Gazebo
Gazebo > South > Gazebo
Location names are case sensitive, but DIRECTIONs are not.
When the program starts, the player will begin in the FIRST room speciﬁed by this ﬁle. If an
empty <PATHS> ﬁle is given, print: “The game cannot run without any rooms :(“ and exit the
You can reasonably expect that any <PATHS> ﬁle we will give you will contain valid input (i.e. no
weird lines like “Grass > Fence > More Grass” or “Not enough > arrows”.)
The second argument, <ITEMS>, should be the name of a ﬁle deﬁning all the Item objects that
are available in-game. Each line is of the form:
short_name | item_name | full_desc | terror_rating | location
Most of these are explained in the description of the Item class on page 9.
full_desc is a long description of the item which is written to a Location‘s description if the
item exists at that location, but has not been picked up by a Creature. More information on
this in can be found in the Location description on page 6.
location – as it implies – speciﬁes the name of a Location that the Item object will appear
in when the game begins. You can expect that this is name will also appear somewhere in
the <PATHS> conﬁguration ﬁle.
rake | battered, old rake | A battered, old rake lies here, dreaming of lakes. | 2 |
It is possible for the game to start and end with no items, so it is possible that the ﬁle speciﬁed by
<ITEMS> is empty. Should this be the case, the game should run as normal.
The third argument, <CHASERS>, should be the name of a ﬁle deﬁning all Creature objects in the
game that are not controlled by the player. Each line of this ﬁle is of the form:
name | description | terror_rating | location | direction
The name of a Creature is a unique name that the program (and the user) can use to refer
to the Creature object.
A description of the Creature will be written to a Location‘s description if the Creature is
in the same Location as the player.
terror_rating describes the terror_rating that a Creature begins with at the start of the
game. This number represents how terrifying something is – or how diﬃcult a Creature is to
frighten. More details about this can be found in the Creature description on page 10.
location – as it implies – speciﬁes the name of a Location that the Creature object will
appear in when the game begins. You can expect that this is name will also appear
somewhere in the <PATHS> conﬁguration ﬁle.
direction describes a movement pattern that a Creature will engage in if it is not
controlled by the player. More on this on pages 10-12.
dog | A dog is barking at you! | 4 | Park | North
As the premise of the game is not possible without any creatures to chase the player, the
<CHASERS> ﬁle cannot be empty! If an empty <CHASERS> ﬁle is provided, print: “There is
nothing chasing you!” and exit the program.
The fourth argument, <EXITS>, should be the name of a ﬁle that contains a list of Location
names. Each of these Location objects will allow the player to use the FLEE command (page 16)
to win the game. If a line speciﬁes a name that does not correspond to a Location, ignore it and
move on to the next one.
It is possible for the <EXITS> conﬁguration ﬁle to be empty – in that case, the player has no
choice but to scare oﬀ all other Creatures to win!
本网站支持 Alipay WeChatPay PayPal等支付方式
E-mail: email@example.com 微信号:vipnxx