Maze generation: Difference between revisions

Content added Content deleted
Line 4,593: Line 4,593:
$this->vertWalls = [];// list of removed vertical walls (|)
$this->vertWalls = [];// list of removed vertical walls (|)
$this->isDebug = $debug; // debug flag
$this->isDebug = $debug; // debug flag

// generate the maze:
$this->generate();
$this->generate();
}
}


private function generate()
protected function generate()
{
{
$this->initMaze(); // init the stack and an unvisited grid
$this->initMaze(); // init the stack and an unvisited grid
Line 4,637: Line 4,639:
* Logs to stdOut if debug flag is enabled
* Logs to stdOut if debug flag is enabled
*/
*/
private function log(...$params)
protected function log(...$params)
{
{
if ($this->isDebug) {
if ($this->isDebug) {