|
BWAPI
|
#include <WalkPositionPath.h>
Public Member Functions | |
| WalkPositionPath () | |
| void | addNode (WalkPosition pos) |
| void | drawPath () |
| WalkPositionPath | getReverse () |
Public Attributes | |
| bool | isComplete |
| std::list< WalkPosition > | path |
Definition at line 5 of file WalkPositionPath.h.
Definition at line 3 of file WalkPositionPath.cpp.
: isComplete(false) { }
| void WalkPositionPath::addNode | ( | WalkPosition | pos | ) |
| void WalkPositionPath::drawPath | ( | ) |
Definition at line 13 of file WalkPositionPath.cpp.
References BWAPI::Broodwar, BWAPI::Game::drawLineMap(), path, WalkPosition::x, WalkPosition::y, and BWAPI::Colors::Yellow.
{
WalkPosition previousPosition(-1, -1);
for each(const WalkPosition &pos in path)
{
if(previousPosition.x != -1 && previousPosition.y != -1)
BWAPI::Broodwar->drawLineMap(pos.x * 8 + 4, pos.y * 8 + 4, previousPosition.x * 8 + 4, previousPosition.y * 8 + 4, BWAPI::Colors::Yellow);
previousPosition = pos;
}
}

Definition at line 25 of file WalkPositionPath.cpp.
References isComplete, and path.
{
WalkPositionPath returnPath;
for each(const WalkPosition &pos in path)
{
returnPath.path.push_front(pos);
returnPath.isComplete = isComplete;
}
return returnPath;
}Definition at line 12 of file WalkPositionPath.h.
Referenced by getReverse().
| std::list<WalkPosition> WalkPositionPath::path |
Definition at line 16 of file WalkPositionPath.h.
Referenced by addNode(), drawPath(), and getReverse().
1.7.6.1