Traps (Optional)ΒΆ

../_images/trap.png

Adding traps is an optional feature that you may want to work on. Do this if you have extra time and would like to figure out some details on your own. Implement the following:

  • add a trap symbol to the map

  • pick an image for the trap

  • draw the traps

  • when the player steps, on a trap, decrease their health

  • decide whether the player actually should move on the trap or stop before it

  • decide whether the trap disappears when triggered or stays where it is.

When the player steps on a trap, you need to call the function implemented in the last chapter:

take_damage(game)

Hint

The outcome could look like this:

../_images/add_traps.png