Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dungeon Game Hit points

Hello team, I dont understand anything of this challenge, could you bring me a lot of help

help to understand the project

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 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!!!

than you Chris I resolved this.