corrections

This commit is contained in:
2025-05-02 03:27:01 +02:00
parent 4a1106fcba
commit b85bf7eb99
3 changed files with 143 additions and 14 deletions

View File

@ -49,10 +49,9 @@ $definitions_horizontales = [];
foreach ($grille->lignes as $y => $mots) {
$definitions_horizontales[$y] = [];
foreach ($mots as $mot) {
$definition = $dico[strlen($mot)][$mot];
if (count($definition)) {
melanger_valeurs($definition);
$definitions_horizontales[$y][] = array_pop($definition);
$definitions = $dico[strlen($mot)][$mot];
if (count($definitions)) {
$definitions_horizontales[$y][] = array_pop($definitions);
}
}
}
@ -60,10 +59,9 @@ $definitions_verticales = [];
foreach ($grille->colonnes as $x => $mots) {
$definitions_verticales[$x] = [];
foreach ($mots as $mot) {
$definition = $dico[strlen($mot)][$mot];
if (count($definition)) {
melanger_valeurs($definition);
$definitions_verticales[$x][] = array_pop($definition);
$definitions = $dico[strlen($mot)][$mot];
if (count($definitions)) {
$definitions_verticales[$x][] = array_pop($definitions);
}
}
}