Gameplay de la recherche dans les dossiers #44

Merged
CoCo_Sol merged 32 commits from directory-search into main 2023-10-30 00:49:00 +00:00
Showing only changes of commit b954b8c879 - Show all commits

View file

@ -76,24 +76,7 @@ def __initialize_world(world: World):
Initialise le monde de la scène. Initialise le monde de la scène.
""" """
world[State] = State.WAITING world[State] = State.WAITING
for y in range(__LINES): names = [
for x in range(__COLUMNS):
entity = world.create_entity(
Position(0, 0),
Order(1),
Centered(),
Texture("directory.png"),
# HoveredTexture("directory_hover.png"),
DirectoryPosition(x, y),
)
world.create_entity(
Position(0, 0),
Order(1),
Centered(),
Text(
random.choice(
[
"Classique", "Classique",
"Menteur", "Menteur",
"Tricheur", "Tricheur",
@ -109,17 +92,23 @@ def __initialize_world(world: World):
"Melatonin", "Melatonin",
"Films", "Films",
"Cinéma", "Cinéma",
"Jeux",
"Développement",
"Programmation",
"Mathématiques",
"Physique",
"Chimie",
"Biologie",
"Géologie",
] ]
), for y in range(__LINES):
), for x in range(__COLUMNS):
entity = world.create_entity(
Position(0, 0),
Order(1),
Centered(),
Texture("directory.png"),
# HoveredTexture("directory_hover.png"),
DirectoryPosition(x, y),
)
world.create_entity(
Position(0, 0),
Order(1),
Centered(),
Text(names.pop()),
TextSize(25), TextSize(25),
DirectoryName(entity), DirectoryName(entity),
) )