I have three files: Main.py, Game.py, and CreateDisplay.py . Obviously Main is going to be the main file where everything is going to run from. This is my first project that i have split the code into separate modules and i am having problems.
The problem i am having is that when the display is made, the background isn't filled with white, its black, and no matter what i do to the variable 'WHITE' it stays black.
Here is the code for each:
Main.py
import pygame
import sys
import Game
import CreateDisplay
#####the main file#####
pygame.init()
if __name__ == '__main__':
Game.Main()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
Game.py
import pygame
import sys
import CreateDisplay
#####the real main game file#####
pygame.init()
def Main():
while True:
CreateDisplay.Display()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
CreateDisplay.py
import pygame
import sys
#####this is the file to make the screen#####
pygame.init()
def Display():
WHITE = (255, 255, 255)
DISPLAY = pygame.display.set_mode((1024, 720))
Please help! I can't figure out what is wrong and i've been working with it for about an hour.






