Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bounce.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-10-05 00:55:57 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-10-05 00:55:57 (GMT)
commit0480bcf8b1ea03dd56080468b3282f199158bc3b (patch)
tree1a29f9bd86b38a0bd7577399a584d75296d50782 /bounce.py
parentda779c5201a465f1e37196ba0ce327300a144abd (diff)
code cleanup
Diffstat (limited to 'bounce.py')
-rw-r--r--bounce.py28
1 files changed, 4 insertions, 24 deletions
diff --git a/bounce.py b/bounce.py
index ebdb86f..7bb943b 100644
--- a/bounce.py
+++ b/bounce.py
@@ -177,30 +177,10 @@ class Bounce():
self.ball.set_label_attributes(24)
self.cells = [] # Easter Egg animation
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball1.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball2.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball2a.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball3.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball3a.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball4.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball4a.svg')))))
- self.cells.append(Sprite(self.sprites, 0, 0,
- _svg_str_to_pixbuf(svg_from_file(
- os.path.join(path, 'basketball5.svg')))))
+ for i in range(8):
+ self.cells.append(Sprite(
+ self.sprites, 0, 0, _svg_str_to_pixbuf(svg_from_file(
+ os.path.join(path, 'basketball%d.svg' % (i + 1))))))
for spr in self.cells:
spr.set_layer(1)
spr.move((0, self.height)) # move animation cells off screen