From 0881d9de069f5127ad6ccf9e1317dd1d16da020b Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 5 Dec 2025 10:25:24 +0100 Subject: [PATCH] foreach inutile --- Grille.php | 4 ++-- index.php | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Grille.php b/Grille.php index 16aee23..f4d3883 100644 --- a/Grille.php +++ b/Grille.php @@ -98,7 +98,7 @@ class Grille implements ArrayAccess "horizontales" => [], "verticales" => [] ]; - foreach($this->lignes as $y => $mots) { + for ($y = 0; $y < $this->hauteur; $y++) { $mots = explode_pos(CASE_NOIRE, $this->get_ligne($y, $this->largeur)); $this->definitions["horizontales"][$y] = []; foreach($mots as $fin => $mot) { @@ -112,7 +112,7 @@ class Grille implements ArrayAccess } } } - foreach($this->colonnes as $x => $mots) { + for ($x = 0; $x < $this->largeur; $x++) { $mots = explode_pos(CASE_NOIRE, $this->get_colonne($x, $this->hauteur)); $this->definitions["verticales"][$x] = []; foreach($mots as $fin => $mot) { diff --git a/index.php b/index.php index 65df085..e312a38 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,4 @@