formatte file

This commit is contained in:
2025-04-01 14:28:43 +02:00
parent f2ae2cbc13
commit e03e5458aa
77 changed files with 1231 additions and 945 deletions

View File

@@ -1,4 +1,4 @@
import sys, pygame
import sys, pygame
import balle
import raquette
from constantes import *
@@ -6,10 +6,10 @@ from constantes import *
pygame.init()
# Creation de la fenetre
ecran = pygame.display.set_mode((LARGEUR_ECRAN,HAUTEUR_ECRAN))
ecran = pygame.display.set_mode((LARGEUR_ECRAN, HAUTEUR_ECRAN))
# Titre de la fenetre
pygame.display.set_caption('Casse_Brique')
pygame.display.set_caption("Casse_Brique")
clock = pygame.time.Clock()
@@ -19,25 +19,23 @@ bouge = False
bouge_gauche_raquette = False
bouge_droite_raquette = False
while True :
for event in pygame.event.get() :
if event.type == pygame.QUIT :
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
elif event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE :
elif event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE:
bouge = not bouge
if pygame.key.get_pressed()[pygame.K_q]:
r1.deplaceGauche()
if pygame.key.get_pressed()[pygame.K_d]:
r1.deplaceDroite()
ecran.fill(BLANC)
if bouge :
if bouge:
b1.deplace(r1)
b1.deplace(r1)
b1.affiche(ecran)
r1.affiche(ecran)