Question: please assist using c++ You are developing a computer simulation in which a robot has to navigate a maze. The maze is represented by a
please assist using c++
You are developing a computer simulation in which a robot has to navigate a maze. The maze is represented by a square 55 grid of cells. Each cell in the grid is either a passage way or a wall. For the first development iteration, passage ways are to be represented by the character ' P ' and walls are to be represented by the character ' W '. The robot is able to move one cell at a time in four possible directions: North, East, South, and West. The robot can move along passages but is blocked by walls. For example, if the robot tries to move North from its current cell and the cell to the North is a passage then the move is successful. However, if the cell to the North is a wall then the move is blocked. Additionally, the robot may not move beyond the boundaries of the maze. A robot controller will be written to place the robot at a location in the maze and control its movements. You may assume that the following constructor and data members exist for the Maze class. Listing 1: The Maze class (a) Complete the Maze class, except for the constructor, and provide a Robot class as well as any other classes or types which are deemed necessary or useful for allowing the robot controller to work. You are not required to write the robot controller. Ensure that the implementation details of the Maze class are hidden, so that if there are implementation changes in future versions (to a matrix of ones and zeros, for example), the Robot class will not have to change. (20 marks) (b) Provide tests which verify the robot's movement in a North direction only. Clearly explain any assumptions that you make concerning the text file containing the maze map, and give the file contents for the maps used in your tests
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
