Python Python Collections Dungeon Game Hit points

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 55,457 Points

The player is defined by a tuple of x, y, and hp. The move function should use the adjustments to x and y contained in the parameter direction to define the player’s new x and y.

This should be a straightforward combining of the positions with the following exceptions:

  • don’t let the new position be outside allowed grid values of 0 to 9
  • if the player’s move tries to go outside the grid, reduce the player hp points by 5.
  • return the new x, y, and hp

Post back if you need more help. Good luck!!!