package map_route_min_possible;

@ISA = qw(map_route);

# cmp - compare two map routes.
#
# $cmp = $node1->cmp($node2);
# Compare two heaped positions.
sub cmp {
    my $self   = shift->[0];
    my $other  = shift->[0];
    my $target = $self->{end};
    return  ($self->{cost_so_far} + $self->{cur}->min_cost($target) )
        <=> ($other->{cost_so_far} + $other->{cur}->min_cost($target) );
}

# To use A* searching:
$start_route = map_route_min_possible->new( $urchin, $sula );
$best_route = branch_and_bound( $start_route );

