

Notice that the function Divide returns (exits) to its caller when a wall is so small it can no longer be divided into two walls that are larger than the minimum. This drawing illustrates recursion because the function Divide calls the function Divide_NS, which calls the function Divide. Pseudocode is a notation resembling a simplified programming language, used in program design. The drawing below is the pseudocode for the recursive-division maze generation algorithm. In coding, this means that a function calls itself or calls a function that calls the first function. Recursion in computer science is is a method of solving a problem where the solution depends on solutions to smaller instances of the same problem. The algorithm is called “recursive division” becuase it uses recursion to build the maze. This algorithm creates a maze with no loops that is, a simply connected maze, which is also called a perfect maze. The AlgorithmĪmazing Maze Maker employs the recursive-division maze generation algorithm. Instead of erasing, however, a player can just move to another part of the world to generate another maze. If the player stands on the ground left of the sunflower and a few blocks west so that the maze is in front, this command will erase a maze so that the area can be used to generate another. If using the program Mazer to walk the maze, the 3 maze blocks must also be changed in Mazer to match the ones here. The blocks from which a maze is built can be changed in the on-start block shown below. Maze Colors Can be Changed in On Start Block If needed, num1 or num2 are adjusted so that each side can be divided resulting in wo areas that are larger than num3 (the minimum). num3 - the minimum number of blocks in a wall.If Z is 0, it is set to num1 generating a square maze.

num2 - the number of blocks for the Z direction (north/south).num1 - the number of blocks for the X direction (east/west).The run chat command can have the following three arguments: The run chat command with no arguments generates the default maze, which is 10 blocks x 10 blocks with minimum wall of 4 blocks. Using Amazing Maze Maker Run Chat Command Generates a Single Maze The mazes generated by Amazing Maze Maker can be used by Mazer, the Maze Walking Snake in MakeCode for Minecraft.
