A path is a succession of moves and actions to go from one location to another.
bool empty() const
Returns true if the path is empty, usually meaning that a path to the destination was not found.
path(const std::vector< step > &steps)
Constructor.
int turns() const
Finds how many turns (rounded down) it takes to reach the end of the path.
const std::vector< step > & steps() const
Returns the steps making up this path.
std::vector< step > m_steps
std::vector< step >::const_iterator first_unsafe_step(unit *unit) const
Finds the first step in the path that is unsafe (if any).
unit * loaded
The unit we are loaded in.
int turns
How many turns it takes to get there.
int waypoints
How many waypoints we have visited so far.
int health
How many HP the unit has left.
unit_order order
The order to come here.
tile * location
Where we are.
bool moved
Whether we moved this turn (for HP recovery)
int fuel_left
How much fuel the unit has left.
bool paradropped
Whether we paradropped this turn.
int moves_left
How many move fragments the unit has left.
bool is_final
Whether this vertex can have children.