Question: Escape the Haunted Castle Pt 2 In Part 2 , you will now subsequently solve that game board while optimizing for a high score. Part
Escape the Haunted Castle Pt
In Part you will now subsequently solve that game board while optimizing for a high score.
Part
There are now treasures contained in the haunted castle.
Your objective is now to escape the castle in as few moves as possible but also maximize the treasures collected along the way.
Each treasure can only be picked up once
Define a class to represent the treasure. Each class should manage its own state and interactions with other classes.
Implement an escape function that returns the minimum number of steps to reach the escape point. The steps should also maximize the number of treasures collected. Movement is allowed up down, left, and right orthogonal traversal only
If there is no viable path to the endpoint, return
Class Descriptions:
Treasure: Represents a treasure, with its position.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
