Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Carlos Irber Junior <luizcarlos@mig.comp.ufscar.br>2008-04-11 16:16:13 (GMT)
committer Luiz Carlos Irber Junior <luizcarlos@mig.comp.ufscar.br>2008-04-11 16:16:13 (GMT)
commit84c87144a210cfacc73d4df5c99741c516c7109f (patch)
tree723b3e338a71634b4f57dc83f08c9209ad785793
parent3adc7503296c7689fba5cceb07455fe694c65ec1 (diff)
Object module namespace cleaned
- This way we can add more objects later without having to edit the levels.py file, but we still need to import and clean by hand in objects/__init__.py . Later we can do this automatically too.
-rw-r--r--Gambiarra/levels.py7
-rw-r--r--Gambiarra/objects/__init__.py16
2 files changed, 17 insertions, 6 deletions
diff --git a/Gambiarra/levels.py b/Gambiarra/levels.py
index 879b48f..0bd26d8 100644
--- a/Gambiarra/levels.py
+++ b/Gambiarra/levels.py
@@ -26,12 +26,7 @@ import os
import simplejson as json
-from objects.balls import *
-from objects.animals import *
-from objects.elastica import *
-from objects.esteira import *
-from objects.target import *
-from objects.wall import *
+from objects import *
from command import *
diff --git a/Gambiarra/objects/__init__.py b/Gambiarra/objects/__init__.py
index e69de29..836988c 100644
--- a/Gambiarra/objects/__init__.py
+++ b/Gambiarra/objects/__init__.py
@@ -0,0 +1,16 @@
+from animals import Penguin
+from balls import SoccerBall, BowlingBall, BeachBall
+from elastica import Elastica
+from esteira import Esteira
+from target import Target
+from things import Thing, check_collision
+from wall import UpWall, DownWall, LeftWall, RightWall
+
+# namespace cleanup
+del animals
+del balls
+del elastica
+del esteira
+del target
+del things
+del wall