Create a c program that will show a maze in the terminal


Program needs to be created in C please. Type out answer aswell to avoid iledgiable writing. Thank you.

Basic requirements

Create a C program that will show a maze in the terminal window and will show a mouse walking through the maze attempting to locate the exit door (the cheese).

The maze is a rectangle. There is a wall of X's that mark the enclosing four walls of the maze. On the left vertical wall there is an opening which is the entrance. On the right vertical wall there is an opening that is the exit. There are no openings in the walls except these two. The interior of the maze is filled with X's and blanks. The mouse walks on the blanks and is not allowed to step on X's.

The mouse can move in any of the four directions (North, East, South, West) one step at a time provided the destination cell is not blocked. The mouse cannot move in a diagonal direction. Each time the mouse takes one step he turns back and places a mark on the cell where he was. That means he is marking his trail. A marked cell is not blocked, and so, the mouse may re-travel over marked cells in the future if necessary.

The inputs to this "game" (maybe we should call it a simulation) are these.

== Density (what percent of the interior is filled with X's)

== Delay (what is the time interval between each step taken by the mouse)

This is a slow mouse. He pauses between step. The user will set how much time the mouse spends thinking between each step.

A maze can have a density of 0%. In that case the interior of the rectangle has no walls. If a maze has a density of 90% then 90% of the interior of the maze is blocked. The user has to input the amount of density of the maze as a whole number. An input of 23 means the maze has a density of 23%.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a c program that will show a maze in the terminal
Reference No:- TGS02900741

Expected delivery within 24 Hours