MAZE Generator
ALGORITHM
- Start
- Declaration of all the necessary variable.
- Display initial message to user to perform some task.
- Depending upon the user input perform task as below:
a) if userInput == 1 then draw maze.
i. Take length and width of maze from user.
ii. Allocate memory segment for all maze dynamically.
iii. Set boundary with “#” character.
iv. Link inner node with each other.
v. Check whether destination is wall or not.if not make it blank.
vi. Draw character of each node to generate maze.
b) else if userInput == 2 then terminate the program.
c) else goto step 3.
- Handle all necessary exception.
- stop.
No comments:
Post a Comment