This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
blockMap[mapX,mapY] = blockType
blockMap = {} mapX = -1 mapY = 0 scale = input("Please input Scale: ") count1 = 0 print scale * scale while count1 < scale * scale: mapX = mapX + 1 if mapX == scale: mapX = 0 mapY = mapY + 1 count1 = count1 + 1 print "--" print "mapX: ",mapX print "mapY: ",mapY print "count1: ",count1 print "--" blockType = input("Enter Block Type for co-ords: ") blockMap[mapX,mapY] = blockType
A dictionary probably isn't the best data structure for that. I would use a list.
In case you need it, here's the rest of the code:
Depends whether or not the data structure is sparse. From the looks of things, it won't be, so a list is definitely an appropriate choice.
If it were sparse, then the simplest way to use a dictionary in a multiple coordinate fashion would be to have the keys be tuples.