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

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Misreading? - Hit Points Challenge

So I am not confused about what this question is asking, I am more confused about how to write the logic because of how I am reading this question and the initial code setup. The confusing portion of the question is:

Our move function takes this three-part tuple player and a direction tuple that's two parts, the x to move and the y (like (-1, 0) would move to the left but not up or down)

move function should have player and direction parameters? If so, the initial code snippet is missing that. If not, then I am confused about how I both figure out players direction they are trying to move and where they are currently at off the same x, y value.

That or the answer went right over the top of my head because I read way too far into it. haha.

movement.py
def move(player):
    x, y, hp = player

    return x, y, hp

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Yeah, that's my fault. Forgot to update the default code snippet.

Fixed that and add a few examples. Thanks for catching it!