0

This is the code that's causing me the error - "video system not initialized":

import sys

import pygame

class AlienInvasion: def main(self): pygame.init()

    self.screen = pygame.display.set_mode((1200, 800))
    pygame.display.set_caption('Alien Invasion')

    def run_game(self):
        while True:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    sys.exit()
            pygame.display.flip()

if name == 'main': 
    ai = AlienInvasion() 
    ai.run_game()
chuck
  • 1,420
  • 4
  • 19
  • Fix your code block. – Joshua Nixon Mar 06 '20 at 14:55
  • I assume you haven't called ```pygame.init()``` – Joshua Nixon Mar 06 '20 at 14:55
  • Welcome to Stackoverflow! Check How do I ask a good question and What is on topic to make sure your post is in good shape. Your question is definitely not well presented. [1]: meta.stackexchange.com/help/how-to-ask [2]: meta.stackexchange.com/help/on-topic – mw509 Mar 06 '20 at 15:08

0 Answers0