]> Skullheadx's Git Forge - fruit-ninja.git/commitdiff
basic window
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Thu, 1 Jun 2023 16:48:19 +0000 (12:48 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Thu, 1 Jun 2023 16:48:19 +0000 (12:48 -0400)
.gitignore
main.py [new file with mode: 0644]
setup.py [new file with mode: 0644]

index d9005f2cc7fc4e65f14ed5518276007c08cf2fd0..3eb56cb1b2b440b4f8be065c26fb0972fe724648 100644 (file)
@@ -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 (file)
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 (file)
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)