Skip to content

poprunner88/meanArena

Repository files navigation

Run the game using:

python3 game.py

Your job, as in the assignment brief, is to write code that controls
Tallon.

To do that, your code needs to specify a value for the function
makeMove() in tallon.py to return. There are four legal values for
makeMove() to return:

Directions.NORTH
Directions.SOUTH
Directions.EAST
Directions.WEST

The simple code in tallon.py just moves Tallon towards the next bonus in
the list.

You should only write code in tallon.py to create your solution, but
you will also need to modify:

config.py

which allows you to change the configuration of the game --- change
the size of the grid, the number of pits, the starting number of Meanies and so
on.

The rest of the files are as follows:

arena.py    -- draws the arena on the screen.

game.py     -- runs the game until Link wins or loses.

graphics.py -- simple Python graphics.

utils.py    -- utilities used in a few places.

world.py    -- keeps track of everything (used by arena.py to draw).

Changes from v1:

1) Directions.NORTH and Directions.SOUTH swapped in updateTallon() in world.py.

2) self.looted changed to self.grabbed in in updateTallon() in world.py.

3) Minor edits to tallonWindy(), tallonSmelly(), tallonGlow(),
isSmelly(), isGlowing(), isAjacent() in world.py.

4) makeMove() in tallon.py edited to fit with the swap of
Directions.NORTH and Directions.SOUTH in updateTallon().

Releases

No releases published

Packages

No packages published

Languages