[SOLVED] COSC220-Project 3

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Project_3-wzc1un.zip (868.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

Write a program that uses recursive function to identify the path in a given maze. The layout of the maze is written in a file called β€œmazexxx.txt” (xxx represent three digit, maze123.txt) that contains a two dimensional array. The array has β€˜0’, β€˜1’, β€˜S’,’F’’ as its values. β€˜0’ indicates the square that is blocked and β€˜1’ indicates the square that you can go through. β€˜S’ indicates the starting square and β€˜F’ indicates the finishing square. See below for an example layout of a maze.

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 1 1 0 1 1 1 1 0
0 1 0 0 0 0 0 0 1 0 0 0 0 1 0
0 1 1 1 1 1 0 0 1 1 1 1 1 1 0
0 1 0 0 0 1 0 0 1 0 0 0 0 0 0
0 1 1 1 1 1 0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 1 1 1 1 1 1 0
0 0 0 1 0 0 0 0 0 0 0 1 0 1 0
0 0 0 1 1 1 1 1 1 1 0 1 0 1 0
0 1 0 0 0 0 0 0 1 0 0 1 0 1 0
0 1 0 0 0 0 0 0 1 0 0 1 0 0 0
0 1 1 1 0 0 0 0 1 0 1 1 1 1 0
0 0 0 1 0 0 0 0 1 0 1 0 0 0 0
0 S 1 1 1 1 1 1 1 0 1 1 1 F 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Your program should also display the found path by drawing β€˜X’ along the path (see below) and write the maze with the found path to another file called β€œsolxxx.txt” (e.g., sol123.txt).

  0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 X X X X X X X X 0 1 1 1 1 0
0 X 0 0 0 0 0 0 X 0 0 0 0 1 0
0 X 1 1 1 1 0 0 X 1 1 1 1 1 0
0 X 0 0 0 1 0 0 X 0 0 0 0 0 0
0 X X X 1 1 0 0 X 0 0 0 0 0 0
0 0 0 X 0 0 0 0 X X X X 1 1 0
0 0 0 X 0 0 0 0 0 0 0 X 0 1 0
0 0 0 X X X X X X 1 0 X 0 1 0
0 1 0 0 0 0 0 0 X 0 0 X 0 1 0
0 1 0 0 0 0 0 0 X 0 0 X 0 0 0
0 1 1 1 0 0 0 0 X 0 X X 1 1 0
0 0 0 1 0 0 0 0 X 0 X 0 0 0 0
0 S X X X X X X X 0 X X X F 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Β 

  • Project_3-wzc1un.zip