Enhance Ball and Player classes for AI integration; update game logic for player and bot interactions
This commit is contained in:
+12
-3
@@ -3,7 +3,16 @@ from game import Game
|
||||
|
||||
pygame.init()
|
||||
|
||||
game = Game()
|
||||
game.run()
|
||||
launch_game = True
|
||||
|
||||
pygame.quit()
|
||||
game = Game()
|
||||
|
||||
while True:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT: pygame.quit()
|
||||
elif event.type == pygame.KEYDOWN: launch_game = True
|
||||
|
||||
if launch_game:
|
||||
launch_game = False
|
||||
game.restart()
|
||||
if game.run() == -1: pygame.quit()
|
||||
|
||||
Reference in New Issue
Block a user