From cb4078e4ce02ab5c7439d4bca4104c574debdc70 Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 14 May 2025 08:45:39 +0200 Subject: [PATCH] fix --- Grille.php | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Grille.php b/Grille.php index 8e92378..1eb166c 100644 --- a/Grille.php +++ b/Grille.php @@ -66,8 +66,8 @@ class Grille implements ArrayAccess if (!isset($this->positions)) { $this->positions = []; - for ($y = 0; $y < $hauteur; $y++) { - for ($x = 0; $x < $largeur; $x++) + for ($y = 0; $y < $this->hauteur; $y++) { + for ($x = 0; $x < $this->largeur; $x++) $this->positions[] = [$x, $y]; } $this->nb_positions = count($this->positions); diff --git a/index.php b/index.php index 7aaf9f4..ef97dac 100644 --- a/index.php +++ b/index.php @@ -134,7 +134,7 @@ function formatter_definition($definition) { definitions["horizontales"][$y])) . "\n↓ " . implode("\n↓ ", array_map("formatter_definition", $grille->definitions["verticales"][$x]))) ?>" /> + title="definitions["horizontales"][$y] ?? [])) . "\n↓ " . implode("\n↓ ", array_map("formatter_definition", $grille->definitions["verticales"][$x] ?? []))) ?>" />