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 Movement

What the teachers Note means?

hi, I dont understand what the teachers notes mean? how come (-1,0) is "LEFT"? thanks!

2 Answers

Alex Koumparos
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Hi Noob,

If you take a look at the Dungeon Entrance video, you'll see that Kenneth designs the grid as a list of 2-tuples where the first value is the X co-ordinate and the second value is the Y co-ordinate.

Accordingly, (-1, 0) could represent left because the first value would be a negative movement along the x-axis (left) and the second value represents no movement on the y-axis.

Cheers,

Alex

horus93
horus93
4,333 Points

imo, while I understand the coords he's using I think it would be simpler to just make the cords in a different fashion and have the tuples be a single number so you'd line them up like "column 1, row 5" etc.