Question
I need help creating a hex grid in c++ and finding the shortest path between 2 objects. This is the critieria: Planet X is the
I need help creating a hex grid in c++ and finding the shortest path between 2 objects. This is the critieria:
Planet X is the only known location of Illudium Phosdex, the shaving cream atom. The planets
surface can be modeled as a 20 x 20 hexagonal map, shown on page 3.
The surface of Planet X is rather plain, except for areas of molten lava, over which neither Duck
Dodgers nor Marvin the Martian can pass. The Illudium Phosdex resides in one non-lava cell on the
map.
The basic goal of this project is simple: assuming that Dodgers and Marvin move at the same rate,
which one can reach the Illudium Phosdex first?
The program must begin by reading seven integers: the row and column of Duck Dodgers starting
position, the row and column of Marvin the Martians starting position, the row and column of the
location of the Illudium Phosdex, and the number of map cells covered in lava.
Next, for each lava cell, the program must read the row and column of the lavas location.
Once the data is read, find a shortest path from both Marvin and Dodgers to the Illudium Phosdex.
Output a shortest path from both characters to the goal, and determine who will claim the Illudium
Phosdex. Break any ties in favor of Marvin the Martian (he has a disintegration gun that doesnt
disintegrate, and hes not afraid to use it).
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