Tuesday, 17 September 2013

Generate Any number of Rects in pygame

Generate Any number of Rects in pygame

I thought you guys might be able to help me wrap my head around this. I
want to be able to generate rects and assign images to those rects. I've
been doing this for the whole project and isn't too hard. The hard part
here is that I want this particular function to be able to generate as
many different rects as I want. The project is a game that takes place on
like a chess board. I figure I can write like... if statements for every
single space and then have like a bazillion parameters in the function
that dictate which rects get generated and where, but I was hoping someone
might be able to think of a more elegant solution.

No comments:

Post a Comment