Mercurial > mamba
comparison mamba/engine.py @ 208:c35e22dc225a
Prepare for circular import
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Wed, 14 Sep 2011 20:30:34 +0200 |
parents | b93845471311 |
children | 7a9be9add4c7 |
comparison
equal
deleted
inserted
replaced
207:dd2c735fdaf4 | 208:c35e22dc225a |
---|---|
1 """Game engine and top-level game loop.""" | 1 """Game engine and top-level game loop.""" |
2 | 2 |
3 from mamba.constants import SCREEN, FPS | 3 from mamba.constants import SCREEN, FPS |
4 from mamba.widgets.base import Container | |
5 | 4 |
6 import pygame.event | 5 import pygame.event |
7 import pygame.display | 6 import pygame.display |
8 import pygame.time | 7 import pygame.time |
9 import pygame | 8 import pygame |
43 | 42 |
44 | 43 |
45 class Habitat(object): | 44 class Habitat(object): |
46 | 45 |
47 def __init__(self, size=SCREEN): | 46 def __init__(self, size=SCREEN): |
47 from mamba.widgets.base import Container | |
48 self.surface_size = size | 48 self.surface_size = size |
49 self.surface = None | 49 self.surface = None |
50 self.container = Container(pygame.Rect((0, 0), self.surface_size)) | 50 self.container = Container(pygame.Rect((0, 0), self.surface_size)) |
51 | 51 |
52 def on_enter(self): | 52 def on_enter(self): |