• Home
  • Blog
  • Mario: Script to Find a Path for Princess Peach to Save Mario

Mario: Script to Find a Path for Princess Peach to Save Mario

0 comments

PLEASE READ THE ATTACHMENT TO UNDERSTAND THE ASSESSMENT

Objective:

Create a C script that will find a path that your heroine, Princess Peach may travel to save Mario.

How it works

0. The user should be prompted to type in the Cell locations of the Entrance (for Peach) and of the Exit (Where Mario’s cage is placed.)

Entrances are on the first row (Regardless of column number) or the first column (Regardless of the row number) while Exits are on the last row (Regardless of column number) or the last column (Regardless of the row number). (I.E. For the Maze_Array on the previous page, (1,3) should be used for the Entrance and (8,22) should be used for the Exit.)

1. 5 cells in the array indicate brick wall that she cannot cross. Remember, she is “Princess Peach” not “Ralph” from “Wreck it, Ralph”!

2. 0 cells with no walls in the array indicate safe passages that Peach can travel.

3. With each iteration, Princess Peach can move forward, backward, upward, downward, to the right, or to the left by one cell.

4. When she faces a dead end, she needs to go back and take a different path.

5. The Princess cannot see the whole design of the Maze. She does not know how paths are connected. Neither do you. (in other words, YOU cannot assist Peach with “Choosing the right PATH” – Your job is creating “user defined functions” based on logic for her to use.)

6. Repeat the steps 3 and 4 until she finally saves Mario.

7. Your final script will be tested with different Maze_Array that you will not find on this assignment set.

you should have comments that explain everything along with script

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}