Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/physics.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-08-31 18:49:11 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-08-31 18:49:11 (GMT)
commit67729dc5eba7dfe9f386530e877f5d0f0cfd5e89 (patch)
treeae62aadb595d7a2281f82cc457e0d2692c0bf750 /physics.py
parentdf3cce02bb640989714dbdc2b5f2a60c29c7721b (diff)
Detect when train falls off
Diffstat (limited to 'physics.py')
-rw-r--r--physics.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/physics.py b/physics.py
index 3b0431e..8b827e8 100644
--- a/physics.py
+++ b/physics.py
@@ -87,6 +87,10 @@ class PhysicsGame:
textpos = text.get_rect(left=700,top=25)
self.screen.blit(text,textpos)
+ if self.bridge.train_off_screen:
+ text = self.font.render("Train fell off the screen, try again!", True, (0,0,0))
+ textpos = text.get_rect(left=700,top=43)
+ self.screen.blit(text,textpos)
# Flip Display
pygame.display.flip()