starting to recreate the wallbreacker

This commit is contained in:
2025-04-10 14:45:38 +02:00
parent b6f8941c53
commit bdfc464080
2 changed files with 41 additions and 0 deletions

27
pygame/jeu/jeu.py Normal file
View File

@@ -0,0 +1,27 @@
from pygame.jeu import niveau
class Jeu:
def __init__(self) -> None:
self.niveau = niveau.Niveau()
self.vie = 3
self.bouge = False
self.etat = 1
def gereJeu(self,ecran):
if self.etat == 1:
pass
elif self.etat == 2:
for event in pygame.event.get():
if event.type() == pygame.QUIT:
sys.exit
elif event.type == pygame.MOUSEBUTTONDOWN:
self.bouge = True
else:
self.bouge = True
niveau.affiche(ecran)
if self.bouge:
self.etat = 1
return 1
elif self.etat == 2:
self.etat = niveau.

14
pygame/jeu/niveau.py Normal file
View File

@@ -0,0 +1,14 @@
class Niveau:
def __init__(self) -> None:
self.b1 = balle.Balle()
self.r1 = raquette.Raquette()
self.m1 = murdebrique.Wall()
def affiche(self,ecran):
ecran.fill(BLANC)
self.b1.affiche(ecran)
self.r1.affiche(ecran)
self.m1.affiche(ecran)
def levelmanager():
for event in pygame.