From 6a034ee8d7329554a85bc89f344845220006d49a Mon Sep 17 00:00:00 2001 From: s450026 Date: Mon, 23 Mar 2020 20:55:52 +0100 Subject: [PATCH] Initialize basic board --- .gitignore | 5 +++++ src/main.py | 28 ++++++++++++++++++++++++++++ try | 0 3 files changed, 33 insertions(+) create mode 100644 .gitignore create mode 100644 src/main.py delete mode 100644 try diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bdfd81 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +.idea +bin +venv +.venv \ No newline at end of file diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..2745f13 --- /dev/null +++ b/src/main.py @@ -0,0 +1,28 @@ +import sys +import pygame + +pygame.init() +screen = pygame.display.set_mode((960, 720)) +done = False +block_size = 60 +WHITE = (255, 255, 255) +BLUE = (0, 0, 255) +screen.fill(WHITE) + + +def main(): + for y in range(400): + for x in range(300): + rect = pygame.Rect(x * block_size, y * block_size, block_size - 1, block_size - 1) + pygame.draw.rect(screen, BLUE, rect) + + while not done: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + pygame.display.update() + + +main() + diff --git a/try b/try deleted file mode 100644 index e69de29..0000000