|
BWAPI
|
#include <PathFinder.h>
Public Member Functions | |
| int | operator() (TilePosition position, TilePosition target) |
Definition at line 39 of file PathFinder.h.
| int DefaultHValue::operator() | ( | TilePosition | position, |
| TilePosition | target | ||
| ) | [inline] |
Definition at line 42 of file PathFinder.h.
References BWAPI::TilePosition::x(), and BWAPI::TilePosition::y().
{
int dx = abs(position.x() - target.x());
int dy = abs(position.x() - target.y());
return abs(dx - dy) * 10 + std::min(dx, dy) * 14;
}

1.7.6.1