Relative Content

Tag Archive for pythonlambda

Why do my python lists skip over [0, 0] when using lambda functions to add/subtract each index value by 1?

I am making a game in pygame, and I am trying to make infinite generation through “areas”.
Basically, these areas are meant to be their own chunks of the map with gaps to move to other areas, and I am using a dictionary that uses the position values of these areas as keys to save the data in areas, but for some reason, whenever I try to go to [0, 0], I go to [0, 1] or [0, -1]. Here are some important segments of code I am using: