-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
88 lines (72 loc) · 2.1 KB
/
Copy pathmain.py
File metadata and controls
88 lines (72 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from tkinter import messagebox
import pygame
from level1 import Game1
from level2 import Game2
from level3 import Game3
from level4 import Game4
from level5 import Game5
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 576
def main1():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("PACMAN")
done = False
clock = pygame.time.Clock()
level1 = Game1()
while not done:
done = level1.process_events()
level1.run_logic()
level1.display_frame(screen)
clock.tick(30)
def main2():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("PACMAN")
done = False
clock = pygame.time.Clock()
level2 = Game2()
while not done:
done = level2.process_events()
level2.run_logic()
level2.display_frame(screen)
clock.tick(30)
def main3():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("PACMAN")
done = False
clock = pygame.time.Clock()
level3 = Game3()
while not done:
done = level3.process_events()
level3.run_logic()
level3.display_frame(screen)
clock.tick(30)
def main4():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("PACMAN")
done = False
clock = pygame.time.Clock()
level4 = Game4()
while not done:
done = level4.process_events()
level4.run_logic()
level4.display_frame(screen)
clock.tick(30)
def main5():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("PACMAN")
done = False
clock = pygame.time.Clock()
level5 = Game5()
while not done:
done = level5.process_events()
level5.run_logic()
level5.display_frame(screen)
clock.tick(30)
pygame.quit()
if __name__ == '__main__':
main1()