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

Re: [pygame] move problems



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