Happens to everyone. It takes time(10 years or 10,000 hours) to get good at
something. I'm at about year 6-7 and I find while I still make silly
mistakes, I've become much better at catching them before or during testing.
:)

On Sat, Apr 25, 2009 at 8:03 AM, Yanom Mobis <ya...@rocketmail.com> wrote:

> oops. I should add that to my list of dumb bugs i find in the code i write.
> Like this one:
>
> if key[K_RIGHT]:
>     spaceship.speed = spaceship.speed+10
> if key[K_RIGHT]:
>     spaceship.speed = spaceship.speed-10
>
>
> :)
> --- On *Sat, 4/25/09, Tyler Laing <trinio...@gmail.com>* wrote:
>
>
> From: Tyler Laing <trinio...@gmail.com>
> Subject: Re: [pygame] Never seen this before
> To: pygame-users@seul.org
> Date: Saturday, April 25, 2009, 9:12 AM
>
>
> Okay, I had assumed you had written your own python class, subclassing one
> of the Group classes, and had used .add within the overridden method. I've
> made that mistake myself.
>
> Looking at your code, I see the issue. For one, Group.add takes in a list
> of sprites. You are passing in three separate arguments, and Group.add is
> thinking they are each sprites.
>
> You should change
>  enemies.add(random.choice(("enemyblue.png", "enemycyan.png",
> "enemygrey.png", "enemyyellow.png")), item, enemybullets)
>
> to
> enemies.add(Enemy(random.choice(("enemyblue.png", "enemycyan.png",
> "enemygrey.png", "enemyyellow.png")), item, enemybullets))
>
>
> The super method can take a class and an object as parameters, and it will
> call the method on the superclass of the class given. It is the same as
> Basicsprite.__init__(self, img)
>
> For reference, here is the documentation about Group.add:
>
> http://www.pygame.org/docs/ref/sprite.html#Group.add
>
> -Tyler
>
> On Sat, Apr 25, 2009 at 6:34 AM, Yanom Mobis 
> <ya...@rocketmail.com<http://mc/compose?to=ya...@rocketmail.com>
> > wrote:
>
>> the two files for the game are attached
>>
>> --- On *Fri, 4/24/09, Brian Song 
>> <unlucky...@gmail.com<http://mc/compose?to=unlucky...@gmail.com>
>> >* wrote:
>>
>>
>> From: Brian Song 
>> <unlucky...@gmail.com<http://mc/compose?to=unlucky...@gmail.com>
>> >
>> Subject: Re: [pygame] Never seen this before
>> To: pygame-users@seul.org <http://mc/compose?to=pygame-us...@seul.org>
>> Date: Friday, April 24, 2009, 9:57 PM
>>
>>  If the problems fixed, yay.. If not, you should put up most/all your
>> source so it's easier for people to see whats happening.
>>
>>
>>
>
>
> --
> Visit my blog at http://oddco.ca/zeroth/zblog
>
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog

Reply via email to