Building some sweep tag I think!

This commit is contained in:
Dan Buch 2024-11-30 22:59:33 -05:00
parent 174c101fb1
commit cf91122a57
Signed by: meatballhat
GPG Key ID: A12F782281063434
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,2 @@
ipython
pygame-ce

33
sweeptag/sweeptag.py Normal file
View File

@ -0,0 +1,33 @@
import pygame
def main():
pygame.init()
screen = pygame.display.set_mode((640, 480))
running = True
font = pygame.Font(None, 80)
title_text = "Sweeptag"
#title_size = font.size(title_text)
title_rendered = font.render(title_text, False, (255, 255, 255), (0, 0, 0))
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT or (
event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE
):
running = False
else:
print(f"EVENT: {event}")
screen.fill((250, 150, 0))
screen.blit(title_rendered, (20, 20))
pygame.display.flip()
pygame.quit()
if __name__ == "__main__":
main()