Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THE PROBLEM: For this project, you will be designing the project and writing the code from the bottom, up. You will write software to allow

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

THE PROBLEM: For this project, you will be designing the project and writing the code from the bottom, up. You will write software to allow a user to traverse a given maze. More specifically, your program will ask the user for a maze file name. It will open the file to load the maze into a 2-D array. It will then wait for the user to traverse the maze using the up, down, right, left arrow keys. A sample program showing you how to "capture" these key strokes will be provided in this module. The file format will contain the number of rows and the number of columns in the maze, followed by (rows X columns) characters forming the maze. There will be 4 different characters in the maze: "X": will represent a wall (space): will represent an open path @: will represent the beginning of the maze l': will represent the end of the maze. Two text files containing mazes will be provided for you. You should create additional test files. The user would like to get out of the maze with the least amount of cost. Each up, right, down, or left arrow keys the user hits, will cost money. If the user hits an open space on the path, $1 is charged and the space is changed to the@ character, and the previous location is changed to a space. If the user hits a dollar sign orn the path, $20 dollars will be deducted from the total cost. If the user hits a wall, $1000 will be charged and the user will be "kicked out" of the maze. The cost of the maze will be printed. When the user hits the '' character, representing the end of the maze, a $1 is charged for that step and the program will print an appropriate message that they have exited the maze, along with the cost of the maze. As the user traverses

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

8. Describe the steps in the development planning process.

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago