From 12ca90e32ea7c00e3aacb797976f72356547b516 Mon Sep 17 00:00:00 2001 From: nickedyer Date: Sun, 19 Feb 2023 12:08:00 -0500 Subject: [PATCH] completely different, is now line test --- colors/main.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/colors/main.py b/colors/main.py index 4bf6c3c..4c32feb 100644 --- a/colors/main.py +++ b/colors/main.py @@ -21,25 +21,17 @@ def game(): clock = pygame.time.Clock() - for i in range(5): - window.fill((255, 0, 0)) + while True: + clock.tick(60) + window.fill((0, 0, 0)) + mouse_pos = pygame.mouse.get_pos() + + pygame.draw.line(window, (255, 255, 255), (720/2, 720/2), mouse_pos, 5) pygame.display.flip() - time.sleep(0.25) - window.fill((255, 255, 0)) - pygame.display.flip() - time.sleep(0.25) - window.fill((0, 255, 0)) - pygame.display.flip() - time.sleep(0.25) - window.fill((0, 255, 255)) - pygame.display.flip() - time.sleep(0.25) - window.fill((0, 0, 255)) - pygame.display.flip() - time.sleep(0.25) - window.fill((255, 0, 255)) - pygame.display.flip() - time.sleep(0.25) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() pygame.quit()