Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45387 > unrolled thread

Re: Question re: objects and square grids

Started byDave Angel <davea@davea.name>
First post2013-05-15 21:20 -0400
Last post2013-05-15 21:20 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question re: objects and square grids Dave Angel <davea@davea.name> - 2013-05-15 21:20 -0400

#45387 — Re: Question re: objects and square grids

FromDave Angel <davea@davea.name>
Date2013-05-15 21:20 -0400
SubjectRe: Question re: objects and square grids
Message-ID<mailman.1729.1368667255.3114.python-list@python.org>
On 05/15/2013 08:53 PM, Andrew Bradley wrote:
>>
>>
>>   <SNIP>
>>
>>   So now, how can I utilize this new grid list? Thank you for the
>>>> help so far, I feel like the entire grid is now being worked out.
>>>> -Andrew
>>>>
>>>>
>> That's a Pygame question, and I told you at the beginning, I can't really
>> help with that.  I'd like to learn, but not this week.
>>
>> Others - can you show some minimal code to use these grid parameters to
>> color selected squares of the pygame window?
>>
>>
> Yes, I would very much like some help or general advice now about utilizing
> this grid thing. How can I refer to these square's new numerical values to
> do things with them? Will I be using things like "grid[0][1]" in specific
> functions and methods to refer to squares now?

Yes, exactly.  Any place in your code (the part I cannot help with) that 
you need to specify a rect, you can specify something like grid[3][18]. 
  Eventually, as Ian pointed out, you'll want to store more information 
about each cell.  But at that time, you could have a more complex object 
(that YOU define) instead of just a rect.  I just don't think you're 
ready for defining such an object.

> That is what I would like to
> do, somehow.
>



-- 
DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web