projects
/
python-bulletml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Knock out final bugs caused by misparenting. Runs all tests as the demo applet.
[python-bulletml.git]
/
bulletml-runner
diff --git
a/bulletml-runner
b/bulletml-runner
index
fc57bce
..
d491988
100755
(executable)
--- a/
bulletml-runner
+++ b/
bulletml-runner
@@
-44,6
+44,7
@@
def main(argv):
target.y = (screen.get_height() - target.y) / 2
if not paused or go:
target.y = (screen.get_height() - target.y) / 2
if not paused or go:
+
for obj in list(active):
new = obj.step()
total += len(new)
for obj in list(active):
new = obj.step()
total += len(new)
@@
-75,6
+76,15
@@
def main(argv):
clock.tick(60)
clock.tick(60)
+ for event in pygame.event.get():
+ if event.type == pygame.QUIT:
+ raise SystemExit
+ elif event.type == pygame.KEYDOWN:
+ if event.key == pygame.K_SPACE:
+ paused ^= True
+ elif event.key == pygame.K_RIGHT:
+ go = True
+
print " Finished: %04d: %d bullets." % (frames, total)
if __name__ == "__main__":
print " Finished: %04d: %d bullets." % (frames, total)
if __name__ == "__main__":