Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(1)  |  Derive(3)  |  Import(1)

src/p/y/pyzza-0.2.15/examples/pacman/main.py   pyzza(Download)
from layout import TopLevel, RoundRect, Widget, Layout, State, Rel, Constraint
from string import repr
from flash.display import Shape
from game import Frame, Keys
 
class Ghost(Shape):
    __slots__ = ('fx', 'fy')
 
    def __init__(self, x, y):
        self.fx = x
class Meal(Shape):
    __slots__ = ('fx', 'fy', 'amount')
    def __init__(self, x, y, amount=10):
        self.fx = x
        self.fy = y
class Pacman(Shape):
    __slots__ = ('fx', 'fy')
    def __init__(self, x, y):
        self.fx = x
        self.fy = y
        self.walls = {}
        self.meals = {}
        self.wallsprite = Shape()
        self.wallsprite.cacheAsBitmap = True
        self.addChild(self.wallsprite)