Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cpp The maze is a 10 10 2d array Homework 2- Robot in Maze Hand in hard copy of your code. Be prepared to run

image text in transcribedCpp
The maze is a 10 10 2d array
Homework 2- Robot in Maze Hand in hard copy of your code. Be prepared to run your code in class. Begin this homework with your code for Homework 1. Create a 'robot' that moves through the maze. The robot makes random moves up, down, left, and right. It can only 'see' locations that are directly adjacent to its current location. After each move, display the robot as an "X' in the maze, and press 'enter to make the next move. Here is an example display. The entrance is on the upper left and the exit is on the lower right: EREE RE* Count the number of moves and, if the robot escapes the maze, display the total. Your program should have three functions: createMaze(char maze[l[columns], int columns, int rows)- initializes your maze . showMaze(char maze[lfcolumns], int columns, int rows)-display maze and robot . robot(char mazelllcolumns], int lastColumn, int lastRow, int &nextColumn, int &nextRow)- robot makes a random move Be sure to pass maze and robot position as parameters in the function call- do no use global variables

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago