INPUT: User is asked to: input N,E,S,W representing N=North, E=East, S=South, W=West until: 20 or more rooms have been explored in the Dungeon Maze…

INPUT:

User is asked to:

input N,E,S,W representing N=North, E=East, S=South, W=West

until:

20 or more rooms have been explored in the Dungeon Maze of Darkness and Randomness!!!

PROGRAM:

Program always starts with initial room having a wall on the E,W,S side and one opening to the North.

Program will keep a memory of the rooms user moves to in sequence.

If user tries to move through a wall, inform the user “Yo! Its a wall, choose another direction.”

If user tries to move through an opening, create a new room, and leave previous room with its layout in memory.

If room is created, the way the user came in MUST remain an opening.

If room is created, randomly select wither there will be 1, 2, or 3 EXTRA openings, in a RANDOM direction (other than the direction where the user entered.)

Store information about this room.

If user enters room ALREADY made, use memory of that room for the user.

OUTPUT:

When 20 room have been created, make a graph using comet() to trace user’s motion of their journey in the Dungeon Maze of Darkness and Randomness!!!

End program.