aboutsummaryrefslogtreecommitdiff
path: root/gui.py
diff options
context:
space:
mode:
authorfoswret <foswret@posteo.com>2025-06-22 09:30:49 -0500
committerfoswret <foswret@posteo.com>2025-06-22 09:30:49 -0500
commit18b51d1918ae95763270abe12aa9f12b2b57d685 (patch)
tree20e76d1c7931b5db3db306f5bd6a3608d48eb81c /gui.py
parentc2ca1d08d1ac33dbe47bfa01fed3e0c696648263 (diff)
removed gui.py, added code.pymain
Diffstat (limited to 'gui.py')
-rw-r--r--gui.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/gui.py b/gui.py
deleted file mode 100644
index 3f9400c..0000000
--- a/gui.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import pygame
-import sys
-from pygame.locals import *
-
-pygame.init()
-
-BLACK = (0, 0, 0)
-GRAY = (99, 99, 99)
-WHITE = (255, 255, 255)
-WINDOW_HEIGHT = 800
-WINDOW_WIDTH = 800
-MARGIN = 20
-MATRIX_HEIGHT = 5
-MATRIX_WIDTH = 4
-
-square_size = 100
-
-
-GridWidthpx = (MATRIX_WIDTH * square_size) + (MATRIX_WIDTH * square_size // 10)
-GridHeightpx = (MATRIX_HEIGHT * square_size) + (MATRIX_HEIGHT * square_size // 10)
-square_x = GridWidthpx // 4 - square_size // 4
-square_y = GridHeightpx // 4 - square_size // 4
-
-square_x_orig = square_x
-
-displaySurface = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT), 0, 32)
-pygame.display.set_caption('tourob GUI')
-
-displaySurface.fill(WHITE)
-
-for y in range(MATRIX_HEIGHT):
- square_x = square_x_orig
- pygame.draw.rect(displaySurface, BLACK, (square_x, square_y, MARGIN, square_size))
- for x in range(MATRIX_WIDTH):
- pygame.draw.rect(displaySurface, BLACK, (square_x - MARGIN, square_y, MARGIN, square_size))
- pygame.draw.rect(displaySurface, GRAY, (square_x, square_y, square_size, square_size))
- square_x += square_size + MARGIN
- pygame.draw.rect(displaySurface, BLACK, (square_x - MARGIN, square_y, MARGIN, square_size))
- square_y += square_size + MARGIN
-while True:
- for event in pygame.event.get():
- if event.type == QUIT:
- pygame.quit()
- sys.exit()
-
- pygame.display.update()