From 9b73f4ea1f1f664ccb5f79f2e5ffbbbdea2969b4 Mon Sep 17 00:00:00 2001 From: adrien Date: Thu, 24 Apr 2025 05:09:42 +0200 Subject: [PATCH] =?UTF-8?q?num=C3=A9rotation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Grille.php | 6 ------ index.php | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Grille.php b/Grille.php index f7b2d2d..a8b1662 100644 --- a/Grille.php +++ b/Grille.php @@ -4,7 +4,6 @@ include_once "dico.php"; const MIN_LETTRES = 1; -const MAX_ESSAIS = 10000; class Grille { @@ -28,7 +27,6 @@ class Grille { $this->mots_commencant_par = []; foreach ($dimensions as $dimension) { $this->mots_commencant_par[$dimension] = []; - // $nb_mots = 1; foreach(mots_espaces($dimension, MIN_LETTRES) as $mot) { for ($i = 0; $i <= $dimension; $i++) { $debut = substr($mot, 0, $i); @@ -37,10 +35,6 @@ class Grille { } $this->mots_commencant_par[$dimension][$debut][] = $mot; } - /* $nb_mots++; - if ($nb_mots > MAX_ESSAIS) { - break; - } */ } } $this->grilles = $this->generateur(); diff --git a/index.php b/index.php index 4f01ccc..16a0ee7 100644 --- a/index.php +++ b/index.php @@ -6,8 +6,8 @@ ini_set('error_reporting', E_ALL); include_once "dico.php"; include_once "Grille.php"; -const HAUTEUR_PAR_DEFAUT = 5; -const LARGEUR_PAR_DEFAUT = 5; +const HAUTEUR_PAR_DEFAUT = 6; +const LARGEUR_PAR_DEFAUT = 6; $hauteur = filter_input(INPUT_GET, 'lignes', FILTER_VALIDATE_INT, [ "options" => [ @@ -47,7 +47,7 @@ $grille = new Grille($hauteur, $largeur); - + "> grille[$l][$c] == " "): ?>