From febe58630eb3525896b4d48bb696ce795ea0903b Mon Sep 17 00:00:00 2001 From: imDigamber <118442466+imDigamber@users.noreply.github.com> Date: Fri, 27 Oct 2023 03:52:48 +0530 Subject: [PATCH] game.py --- game.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 game.py diff --git a/game.py b/game.py new file mode 100644 index 0000000..5b18efc --- /dev/null +++ b/game.py @@ -0,0 +1,29 @@ +Simple pygame program + +# Import and initialize the pygame library +import pygame +pygame.init() + +# Set up the drawing window +screen = pygame.display.set_mode([500, 500]) + +# Run until the user asks to quit +running = True +while running: + + # Did the user click the window close button? + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + + # Fill the background with white + screen.fill((255, 255, 255)) + + # Draw a solid blue circle in the center + pygame.draw.circle(screen, (0, 0, 255), (250, 250), 75) + + # Flip the display + pygame.display.flip() + +# Done! Time to quit. +pygame.quit()