From 27b60336251693698edd7f3a3298814d65e71b90 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 5 Dec 2025 09:10:41 +0100 Subject: [PATCH] pas d'infobulle sur les mots d'une lettre --- Grille.php | 3 ++- index.php | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Grille.php b/Grille.php index 6324fe4..4624737 100644 --- a/Grille.php +++ b/Grille.php @@ -150,6 +150,7 @@ class Grille implements ArrayAccess $lettres_ligne->branches, $lettres_colonne->branches ); + // Sélection des candidats les plus fertiles foreach ($lettres_communes as $lettre => $_) { $lettres_communes[$lettre] = log(count($lettres_ligne->branches[$lettre])) * count($lettres_colonne->branches[$lettre]) * gaussienne(ECART_TYPE, ECART_TYPE); } @@ -196,7 +197,7 @@ class Grille implements ArrayAccess if ($y == $this->hauteur - 1) { $mots = explode_pos(CASE_NOIRE, $this->get_colonne($x, $this->hauteur)); foreach ($mots as $rang => $mot) { - if (strlen($mot) < 2) continue; + //if (strlen($mot) < 2) continue; if (strlen($mot > 2) && in_array($mot, array_merge(...$this->lignes, ...$this->colonnes))) continue 2; else $this->colonnes[$x][$rang] = $mot; } diff --git a/index.php b/index.php index eadb9f2..f73d94b 100644 --- a/index.php +++ b/index.php @@ -150,7 +150,7 @@ function mot_courant($mots, $position) { $definition_verticale = mot_courant($grille->definitions["verticales"][$x], $y); if (isset($definition_horizontale[0])) $title .= "→ " . $definition_horizontale[0]; if (isset($definition_horizontale[1])) $title .= " (" . $definition_horizontale[1] . ")"; - if (isset($definition_verticale[0])) $title .= "\n ↓ " . $definition_verticale[0]; + if (isset($definition_verticale[0])) $title .= "\n↓ " . $definition_verticale[0]; if (isset($definition_verticale[1])) $title .= " (" . $definition_verticale[1] . ")"; $title = htmlspecialchars($title); ?> @@ -174,7 +174,9 @@ function mot_courant($mots, $position) {
    +
  1. +
@@ -194,7 +196,9 @@ function mot_courant($mots, $position) {
    +
  1. +