Building some sweep tag I think!
This commit is contained in:
parent
174c101fb1
commit
cf91122a57
2
sweeptag/requirements.txt
Normal file
2
sweeptag/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ipython
|
||||||
|
pygame-ce
|
33
sweeptag/sweeptag.py
Normal file
33
sweeptag/sweeptag.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user