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

Re: [pygame] move problems



ok.
thanks

--- On Wed, 2/11/09, James Paige <Bob@xxxxxxxxxxxxxxxxxxx> wrote:

From: James Paige <Bob@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [pygame] move problems
To: pygame-users@xxxxxxxx
Date: Wednesday, February 11, 2009, 6:04 PM


-----Inline Attachment Follows-----

On Wed, Feb 11, 2009 at 03:46:21PM -0800, Yanom Mobis wrote:
>    if key[K_UP]:                                                             

This uses K_UP as the index and returns the value at that index.

>    if K_UP in key:                                                           

The "in" operator searches the values of the "key" list but it will
never find a match because K_UP is not a 0 or a 1.

---
James Paige