describedByArray() as $mapRowIndex => $mapRow) { foreach ($mapRow as $mapColumnIndex => $containsCoffee) { if ($containsCoffee == true) { $tile = new Tile($mapColumnIndex, $mapRowIndex); $spot = new Spot($tile); $table->addSpot($spot); } } } var_dump($map->describedByArray()); } catch (\Exception $e) { echo 'Caught exception: ' . $e->getMessage() . "\n"; }