From: Skullheadx <704277@pdsb.net> Date: Mon, 21 Nov 2022 02:13:46 +0000 (-0500) Subject: pygame window X-Git-Url: http://git.skullheadx.com/nixos/static/gitweb.css?a=commitdiff_plain;h=a8e137c8f0f5754475a646765ad08af6468e5221;p=word-hunt.git pygame window --- diff --git a/Main/__pycache__/setup.cpython-310.pyc b/Main/__pycache__/setup.cpython-310.pyc new file mode 100644 index 0000000..f71793c Binary files /dev/null and b/Main/__pycache__/setup.cpython-310.pyc differ diff --git a/Main/main.py b/Main/main.py new file mode 100644 index 0000000..8bc2939 --- /dev/null +++ b/Main/main.py @@ -0,0 +1,13 @@ +from setup import * + + +is_running = True + +while is_running: + screen.fill(Colour.WHITE) + + + if pygame.event.peek(pygame.QUIT): + is_running = False + + pygame.display.update() diff --git a/Main/setup.py b/Main/setup.py index b1a6a7c..dc7b654 100644 --- a/Main/setup.py +++ b/Main/setup.py @@ -1,3 +1,21 @@ import json +import pygame +import random + +# word list from https://github.com/dwyl/english-words with open("pruned_words.json", 'r') as f: word_list = json.load(f) + + + +pygame.init() +# SCREEN_WIDTH, SCREEN_HEIGHT = 720, 720 +# dimensions = pygame.Vector2(SCREEN_WIDTH, SCREEN_HEIGHT) +# center = pygame.Vector2(SCREEN_WIDTH/2, SCREEN_HEIGHT/2) +screen = pygame.display.set_mode((0,0), pygame.RESIZABLE) + +pygame.display.set_caption("Word Hunt") + + +class Colour: + WHITE = (255,255,255)