[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] bidimensional arrays or the quick way to maps



You can use lists of lists, for example with a function like

def makearray(w,h):
     a = []
     for i in range(w):
             a.append([None]*h)
     return a

Then you adress the elements like a[2][3]. This is probably not very
efficient, but for maps it should be ok.

Ulf