diff --git a/game_manager.py b/game_manager.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py new file mode 100644 index 0000000..0062dd2 --- /dev/null +++ b/main.py @@ -0,0 +1,36 @@ +"""importing Important Modules""" + +from settings import width, height +import sys +import pygame +import random + + +def main(): + # Initialize Pygame + pygame.init() + + # Set up the display + screen = pygame.display.set_mode((width, height)) + pygame.display.set_caption("Tetris") + + # Set up the clock for controlling the frame rate + clock = pygame.time.Clock() + + # Main game loop + while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + # Update the display + pygame.display.flip() + + # Control the frame rate + clock.tick(60) + + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..91c1e9d --- /dev/null +++ b/settings.py @@ -0,0 +1,3 @@ +# Set global width and height variables +global width, height +width, height = 800, 600 \ No newline at end of file diff --git a/tetrominos.py b/tetrominos.py new file mode 100644 index 0000000..e69de29