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
Alex Koumparos
Python Web Development Techdegree Student 35,912 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.



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.