Annotation of pyfrog/pyfrog.py, revision 1.1.1.1
1.1 nick 1: #!/usr/bin/python
2:
3: import screen
4: import pygame
5:
6: ##
7: ## Define our game initial variables
8: ##
9: VERSION = "$Id$"
10: TITLE = "Frogger"
11: SCREEN_WIDTH = 640
12: SCREEN_HEIGHT = 480
13: LIVES = 3
14: SCORE = 0
15:
16: ##
17: ## Our points table
18: ##
19: SCORE_HOP = 10
20: SCORE_GOAL = 50
21: SCORE_LEVEL = 1000
22: SCORE_FLY = 150
23: SCORE_PINK = 200
24: SCORE_SECONDS = 10
25: HIGH_SCORE = 4630
26: SCORE_FREE_FROG = 2000
27:
28: def beginGame( ):
29: next_heartbeat = 0
30: done = 0
31:
32: pygame.init( )
33: size = width, height = SCREEN_WIDTH, SCREEN_HEIGHT
34: screen = pygame.display.set_mode( size )
35: if screen == NULL:
36: print "ERROR"
37: sys.exit( )
38:
39: print( "D: Starting main game loop" );
40:
41: while 1:
42: for event in pygame.event.get( ):
43: if event.type == pygame.QUIT: sys.exit( )
44:
45:
46:
47: beginGame( )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>