2

I've looked through a number of code examples, but I can't determine why the window screen is not changing to blue.

import sys, pygame

pygame.init()

clock = pygame.time.Clock()

size = (1000, 440)
black = (0,0,0)
blue = (0,0,255)
white = (255,255,255)

screen = pygame.display.set_mode(size)
done = False

while not done:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            sys.exit()

    screen.fill(blue)
    pygame.display.update()

I expect the screen to change colors, but it's just stay at a default grey.

  • 1
    and it should change colors, as it does on my system. Is there any other relevant information that could help? What system are you on? – The4thIceman Dec 21 '18 at 04:43
  • Shoot it's working on your computer! I might have to reinstall the software. – user2113591 Dec 21 '18 at 07:10
  • @user2113591 Let me guess, you're on MacOS? – sloth Dec 21 '18 at 08:35
  • That's correct. I have discovered the problem! I was using python 3, but there was a second python framework 2.7 and Pygame was installed to this network so...a little messing around and now I use python3 [name of program] and it works – user2113591 Dec 21 '18 at 08:48

0 Answers0