First commit (structure)

This commit is contained in:
IM23a-bachmannj2
2024-10-23 21:28:25 +02:00
parent e9396a7b6f
commit a90a53411e
4 changed files with 39 additions and 0 deletions
+36
View File
@@ -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()