view world.py @ 24:eab8af30dfc7

get_free_slot no raises an exception instead of appending a slot to the container.
author KarstenBock@gmx.net
date Fri, 02 Sep 2011 12:54:43 +0200
parents 708a6f651c31
children b30a72c41f90
line wrap: on
line source

from parpg.grease.world import *
from parpg.mode import FifeMode

class World(FifeMode, BaseWorld):

    def __init__(self):
        FifeMode.__init__(self)
        BaseWorld.__init__(self)
    
    def pump(self, dt):
        for component in self.components:
            if hasattr(component, "step"):
                component.step(dt)
        for system in self.systems:
            if hasattr(system, "step"):
                system.step(dt)