Mode menteur #45

Merged
CoCo_Sol merged 10 commits from menteur into main 2023-10-30 00:57:21 +00:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit 8defb4ba9f - Show all commits

View file

@ -4,13 +4,14 @@ Example de l'utilisation du moteur de jeu.
from engine import start_game from engine import start_game
from scenes import classique, menu from scenes import classique, menteur, menu
start_game( start_game(
{ {
"menu": menu.SCENE, "menu": menu.SCENE,
"classique": classique.SCENE "classique": classique.SCENE,
"menteur": menteur.SCENE
}, },
"menu", "menu",
title="Guess The Number", title="Guess The Number",

View file

@ -103,7 +103,7 @@ def __initialize_world(world: World):
TextSize(100), TextSize(100),
NombreEssaiText(), NombreEssaiText(),
Color(61, 22, 58), Color(61, 22, 58),
Text("il reste : 7 essais"), Text("il reste : 15 essais"),
) )
# Bouton pour revenir au menu # Bouton pour revenir au menu
@ -116,8 +116,8 @@ def __initialize_world(world: World):
) )
# Les ressources. # Les ressources.
world[NombreEssai] = NombreEssai(7) world[NombreEssai] = NombreEssai(15)
world[RandomNumber] = RandomNumber(random.randint(0, 99)) world[RandomNumber] = RandomNumber(randint(0, 99))
world[IsRunning] = IsRunning() world[IsRunning] = IsRunning()
@ -130,7 +130,7 @@ def _update(world: World):
# si le jeu s'est arrete. # si le jeu s'est arrete.
if IsRunning not in world: if IsRunning not in world:
# on relance le jeu. # on relance le jeu.
world[Game].change_scene("classique") world[Game].change_scene("menteur")
for entity in world.query(typing.Typing, Text): for entity in world.query(typing.Typing, Text):
# One efface le nombre. # One efface le nombre.