BWAPI
Public Member Functions | Public Attributes
BuildTilePath Class Reference

#include <BuildTilePath.h>

List of all members.

Public Member Functions

 BuildTilePath ()
void addNode (TilePosition pos)
void drawPath ()
bool isStillValid ()

Public Attributes

bool isComplete
std::list< TilePositionpath

Detailed Description

Definition at line 5 of file BuildTilePath.h.


Constructor & Destructor Documentation

Definition at line 4 of file BuildTilePath.cpp.

        : isComplete(false)
{
}

Member Function Documentation

Definition at line 9 of file BuildTilePath.cpp.

References path.

Referenced by PathFinderClass::CreateTilePath().

{
        path.push_front(pos);
}

Here is the caller graph for this function:

Definition at line 14 of file BuildTilePath.cpp.

References BWAPI::Broodwar, BWAPI::Game::drawLineMap(), BWAPI::TilePositions::None, BWAPI::BulletTypes::None, path, BWAPI::TilePosition::x(), BWAPI::TilePosition::y(), and BWAPI::Colors::Yellow.

{
        TilePosition previousTile = BWAPI::TilePositions::None;
        for each(const TilePosition &pos in path)
        {
                if(previousTile != BWAPI::TilePositions::None)
                        BWAPI::Broodwar->drawLineMap(pos.x() * 32 + 16, pos.y() * 32 + 16, previousTile.x() * 32 + 16, previousTile.y() * 32 + 16, BWAPI::Colors::Yellow);

                previousTile = pos;
        }
}

Here is the call graph for this function:

Definition at line 26 of file BuildTilePath.cpp.

References Singleton< T >::Instance(), MapHelper::isTileWalkable(), and path.

Referenced by WorkerScoutTask::update().

{
        for each(const TilePosition &pos in path)
        {
                if(!BuildingPlacer::Instance().isTileWalkable(pos))
                        return false;
        }

        return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 12 of file BuildTilePath.h.

Referenced by PathFinderClass::CreateTilePath(), and WorkerScoutTask::update().

Definition at line 16 of file BuildTilePath.h.

Referenced by addNode(), drawPath(), isStillValid(), and WorkerScoutTask::update().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines