getHexes(); $i = 0; foreach ($hexes as $k => $h) { // marquer approximativement 10% comme forĂȘt if ($i++ % 10 === 0) { if (method_exists($h, 'setTile')) $h->setTile('forest'); } } } public static function tileDefinitions(): array { return [ ['id' => 'forest', 'name' => 'ForĂȘt', 'color' => '#2b7a2b'], ['id' => 'field', 'name' => 'Champ', 'color' => '#f4ecb0'] ]; } }