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) {