-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
executable file
·48 lines (35 loc) · 1.1 KB
/
app.py
File metadata and controls
executable file
·48 lines (35 loc) · 1.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
"""
Pong Game - Main Application Entry Point
A classic Pong game implementation using professional design patterns
including State Pattern, MVC architecture, and Singleton pattern.
Controls:
Player 1 (Left): W/S keys
Player 2 (Right): Arrow Up/Down keys
ESC: Pause game
Author: Userlg
Version: 2.0.0
"""
import sys
import colorama as co
# Initialize colorama for console colors
co.init()
# Console colors
yellow = co.Fore.YELLOW
def main() -> None:
"""Main entry point for the Pong game."""
try:
# Import here to ensure proper initialization order
from game.game_manager import GameManager
# Print welcome message
print(yellow + '\t\t Welcome to Pong Game v2.0 \n\n')
# Create and run game
game = GameManager()
game.run()
except Exception as e:
print(f"Error starting game: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == '__main__':
main()
#######################Created by Userlg ##################################################################