Question
Imagine a dungeon game where all the rooms are laid out in a perfect grid within a square environment. Each room has a creature posing
Imagine a dungeon game where all the rooms are laid out in a perfect grid within a square environment. Each room has a creature posing some degree of danger ranging from 0 (harmless) to 9 (avoidance would be prudent). The object is to find a path through the dungeon from start to end which minimizes the overall amount of danger.
Each room, unless at a boundary, only has exists in the up, down, left, right directions (no diagonals). The entrance is at the upper-left (0,0) and the exit is at the lower right (n-1, n-1).
List all of the rooms which must be traversed, in the form of a path of room coordinates, from the start to finish.
Here is what we were given :
https://www.dropbox.com/s/t1hq5v2c37tkzcj/DungeonEscapeShell.zip?dl=0
00 70 20 5040 10 50 10 2010 10 20 20 1010 10 90 50 3050 10 10 90 1000 Example input file: 00 70 20 50 40 10 50 10 20 10 10 20 20 10 10 10 90 50 30 50 10 10 90 10 00 Example output: (0,0) (2,0) (2,2) (2,3) (3,3) (4,3) (4,4) Total danger 110
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started