Mode menteur #45

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,5 +1,5 @@
""" """
Définis la scène du jeu classique, sans variante. Définis la scène du jeu menteur, sans variante.
""" """
from random import randint from random import randint
@ -52,6 +52,9 @@ class IsRunning:
""" """
COLOR_TEXT = Color(59, 162, 0)
def __initialize_world(world: World): def __initialize_world(world: World):
""" """
Initialise le monde du menu. Initialise le monde du menu.
@ -66,11 +69,11 @@ def __initialize_world(world: World):
# Bouton valider/rejouer # Bouton valider/rejouer
world.create_entity( world.create_entity(
Position(Display.WIDTH / 2, 900), Position(Display.WIDTH / 2, 880),
Order(1), Order(1),
Centered(), Centered(),
Texture("classique/valider.png"), Texture("menteur/valider.png"),
HoveredTexture("classique/valider_hover.png"), HoveredTexture("menteur/valider_hover.png"),
Clickable(lambda world, _: _update(world)), Clickable(lambda world, _: _update(world)),
) )
@ -81,7 +84,7 @@ def __initialize_world(world: World):
Centered(), Centered(),
typing.Typing("1234567890"), typing.Typing("1234567890"),
Text(""), Text(""),
Color(61, 22, 58), COLOR_TEXT,
TextSize(150), TextSize(150),
) )
@ -92,17 +95,17 @@ def __initialize_world(world: World):
Centered(), Centered(),
TextDialogue(), TextDialogue(),
TextSize(150), TextSize(150),
Color(61, 22, 58), COLOR_TEXT,
Text("Devine le nombre..."), Text("Devine le nombre..."),
) )
# Text qui affiche le nombre d'essai # Text qui affiche le nombre d'essai
world.create_entity( world.create_entity(
Position(Display.WIDTH - 700, 100), Position(Display.WIDTH - 750, 120),
Order(4), Order(4),
TextSize(100), TextSize(100),
NombreEssaiText(), NombreEssaiText(),
Color(61, 22, 58), COLOR_TEXT,
Text("il reste : 15 essais"), Text("il reste : 15 essais"),
) )
@ -110,9 +113,9 @@ def __initialize_world(world: World):
world.create_entity( world.create_entity(
Order(11), Order(11),
Position(100, 100), Position(100, 100),
Texture("classique/arrow.png"), Texture("menteur/arrow.png"),
Clickable(lambda world, _: world[Game].change_scene("menu")), Clickable(lambda world, _: world[Game].change_scene("menu")),
HoveredTexture("classique/arrow_hover.png"), HoveredTexture("menteur/arrow_hover.png"),
) )
# Les ressources. # Les ressources.
@ -192,8 +195,8 @@ def end_game(world: World, state: str):
# on change la texture du button submit. # on change la texture du button submit.
for entity in world.query(Clickable, Centered): for entity in world.query(Clickable, Centered):
entity[Texture] = Texture("classique/play_again.png") entity[Texture] = Texture("menteur/play_again.png")
entity[HoveredTexture] = HoveredTexture("classique/play_again_hover.png") entity[HoveredTexture] = HoveredTexture("menteur/play_again_hover.png")
def _check_return(world: World): def _check_return(world: World):