diff --git a/gameover1.bmp b/gameover1.bmp new file mode 100644 index 0000000..ebd1bdf Binary files /dev/null and b/gameover1.bmp differ diff --git a/main.py b/main.py index bb2c347..2ea25be 100644 --- a/main.py +++ b/main.py @@ -14,6 +14,10 @@ import pygame import math +# Images +gameover = pygame.image.load('gameover1.bmp') + +# Colors BLACK = (0,0,0) WHITE = (255,255,255) BLUE = (0,0,255) @@ -182,12 +186,14 @@ def main(): running = False if player.train_wreck(train): - train.dx = 0 - print "Game over!" + train.constdx = 0 + player.dx = 0 running = False + # keep train moving train.step() + # decrease speed of player (and all things relative to it) for model in controlled_models: # good delta speed is .00005 if model.dx > .01: @@ -205,6 +211,14 @@ def main(): pygame.display.update() + running = True + while running == True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + screen.blit(gameover,(60,60)) + pygame.display.flip() + pygame.quit() if __name__ == '__main__':