From fc829602306853c7f886e633abe6f438e14d11b9 Mon Sep 17 00:00:00 2001 From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Thu, 1 Jun 2023 12:48:19 -0400 Subject: [PATCH] basic window --- .gitignore | 2 +- main.py | 15 +++++++++++++++ setup.py | 13 +++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 main.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index d9005f2..3eb56cb 100644 --- a/.gitignore +++ b/.gitignore @@ -149,4 +149,4 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +.idea/ diff --git a/main.py b/main.py new file mode 100644 index 0000000..cd398ce --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ +from setup import * + + +FPS = 120 +clock = pygame.time.Clock() + +is_running = True +while is_running: + clock.tick(FPS) + for event in pygame.event.get(): + if event.type == pygame.QUIT: + is_running = False + screen.fill(WHITE) + pygame.display.update() +pygame.quit() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1d7cc63 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +import pygame + +pygame.init() +WIDTH, HEIGHT = 800, 500 + +screen = pygame.display.set_mode((WIDTH, HEIGHT)) + +pygame.display.set_caption("Fruit Ninja") + +# colors +WHITE = (255, 255, 255) +BLACK = (0, 0, 0) +RED = (255, 0, 0) -- 2.54.0