Re: pygame.Rect question

2012-04-09 Thread Peter Pearson
On Sun, 8 Apr 2012 16:58:01 -0700 (PDT), Scott Siegler wrote: [snip] > I set rect.left to 30, rect.top to 30 and rect.width = 20 > > This works fine. However, when looking at rect.right() it > shows that it is equal to 50. I suppose this is equal to > 30+20. However, since the first pixel is on l

Re: pygame.Rect question

2012-04-09 Thread Pekka Karjalainen
On Mon, Apr 9, 2012 at 3:29 AM, Dave Angel wrote: > I don't know about pygame, but almost everywhere in the standard > library, ranges are closed at the begin and open at the end.  For > example, if you have range(30, 50), there are 20 items, numbered 30 > through 49.  I expect the same will be tr

Re: pygame.Rect question

2012-04-08 Thread Dave Angel
On 04/08/2012 07:58 PM, Scott Siegler wrote: > Hello, > > I am new to Python and began using pygame to start some game programming. I > was hoping someone could help me out with something that seems simple but is > really confusing me. > > I am creating a rect and then using the attributes of th

pygame.Rect question

2012-04-08 Thread Scott Siegler
Hello, I am new to Python and began using pygame to start some game programming. I was hoping someone could help me out with something that seems simple but is really confusing me. I am creating a rect and then using the attributes of the rect to set the size and location. I set rect.left to