From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:48:19 +0000 (-0400) Subject: basic window X-Git-Tag: game~35 X-Git-Url: http://git.skullheadx.com/nixos/static/git-logo.png?a=commitdiff_plain;h=fc829602306853c7f886e633abe6f438e14d11b9;p=fruit-ninja.git basic window --- 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)