I am making game from "Python Crash Course" but have a problem with showing pygame window. It looks like Python Launcher app trying to launch but nothing happens, icon of Python Launcher bouncing in Dock and that's it.
import sys
import pygame
def run_game():
#Initilize game and create a screen object.
pygame.init()
pygame.display.init()
screen = pygame.display.set_mode((1200, 800))
pygame.display.set_caption("Alien Invasion")
#Start the main loop for the game.
while True:
# Watch for keyboard and mouse events.
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
# Make the most recently drawn screen visible.
pygame.display.flip()
run_game()
any idea how to fix it? Thank you very much for any help!
upd. I am using MacOS Catalina.