From f7efaa3e804e8bab781c29fec66fe657076af136 Mon Sep 17 00:00:00 2001 From: "laneury.a" <> Date: Tue, 18 Feb 2025 20:30:23 +0100 Subject: [PATCH] prgm principal --- main.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..fa4e8fe --- /dev/null +++ b/main.py @@ -0,0 +1,46 @@ +""" +Jeu cars and run 2D + +Script python: +""" +import pygame +from pygame.locals import * +from constantes import * + +pygame.init() + +#ouverture de la fenetre +fenetre = pygame.display.set_mode((largeur_fenetre, hauteur_fenetre)) +fenetre.fill((0,128,255)) + +#Icone +icone = pygame.image.load(image_icone) +pygame.display.set_icon(icone) + +#Titre +pygame.display.set_caption(titre_fenetre) + + + +continuer = 1 + +while continuer: + for event in pygame.event.get(): #Attente des événements + if event.type == QUIT: + continuer = 0 + + #BOUCLE DE JEU: + if event.type == KEYDOWN: + + + if event.key == K_F1: + #boucle acceuil + fenetre.fill((0,0,0)) + if event.key == K_F1: + #boucle niveau + pass + + + pygame.display.flip() + +pygame.quit() \ No newline at end of file