[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygsear] class inheritance
From: |
Lee Harr |
Subject: |
Re: [pygsear] class inheritance |
Date: |
Mon, 21 Apr 2003 06:15:35 +0000 |
Lee
I just checked out 42.1, nice.
Thanks. I am trying to wrap my brain around twisted right now to
get a simple networked tank game going.
I like chase.py. I looked at the code. I have been recently trying to
learn oop.
The class declaration:
class AGame(Game.Game) is not something I've seen.
May I ask you to elaborate?
Game is the name of a pygsear module. It is also the name of a
class in the Game module. If the class had been called ProtoGame
then the class declaration would have been:
import Game
class AGame(Game.ProtoGame):
or, I could have imported that particular class only like:
from Game import ProtoGame
class AGame(ProtoGame):
Hope that makes it more clear...
Is there a plan to allow drawing in euclid.py?
You can draw with euclid just as with penguin. Just use
from euclid import *
instead of
from penguin import *
A few differences:
- the point (0, 0) is in the center of the screen
- 1 unit is (by default) 30 pixels
- the penguin's name is tom :o)
Have fun!
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus