Overseer
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Overseer::Map Class Reference

is the overseer map that holds the most "important" functionality for a outside user. More...

#include "Map.h"

Inheritance diagram for Overseer::Map:
Inheritance graph
[legend]

Public Member Functions

 Map ()
 Simple default constructor does no initzalation.
 
 Map (sc2::Agent *bot)
 constructor. More...
 
size_t getHeight () const
 
size_t getWidth () const
 Gets the map width. More...
 
std::vector< std::shared_ptr< Region > > getRegions ()
 Gets all the regions found. More...
 
RegiongetRegion (size_t id)
 Get a specific region. More...
 
const RegiongetNearestRegion (sc2::Point2D pos)
 Gets closest region to a specific point. More...
 
void addTile (sc2::Point2D &pos, std::shared_ptr< Tile > tile)
 Apends a tile to container. More...
 
bool valid (sc2::Point2D pos) const
 Check if a position is on map. More...
 
TilePosition getClosestTilePosition (sc2::Point2D pos) const
 Get the closest tile position. More...
 
void addRegion (Region region)
 Apends a region to the container. More...
 
std::shared_ptr< TilegetTile (sc2::Point2D pos)
 Gets a tile based on the position. More...
 
size_t size () const
 Gets the size of the tile position container. More...
 
TilePositionContainer getTilePositions () const
 Get all tile positions. More...
 
std::vector< TilePosition > getXelNagas ()
 Get all tilePosition for Xel'nagas watch towers. More...
 
std::vector< TilePosition > getMinerals ()
 Get all tilePosition for Minerals. More...
 
std::vector< TilePosition > getGeysers ()
 Get all tilePosition for Geysers. More...
 
std::vector< TilePosition > getDestructibles ()
 Get tilePositions for Destructible objects. More...
 
void setBot (sc2::Agent *bot)
 set the bot into overseer More...
 
std::vector< std::shared_ptr< TilePosition > > getFrontierPositions () const
 Get tiles that is between two regions. More...
 
RawFrontier getRawFrontier () const
 region pair and frontier map. More...
 
sc2::Agent * getBot () const
 Gets the set agent. More...
 

Protected Member Functions

std::pair< size_t, size_t > findNeighboringRegions (std::shared_ptr< TilePosition > tilePosition)
 

Protected Attributes

sc2::Agent * m_bot
 
UnitPositionContainer m_unitPositions
 
TilePositionContainer m_tilePositions
 
std::vector< std::shared_ptr< TilePosition > > m_buildableTiles
 
RegionMap m_regions
 
std::vector< std::shared_ptr< TilePosition > > m_frontierPositions
 
RawFrontier m_rawFrontier
 
sc2::Point2D m_maxPlayable
 
sc2::Point2D m_minPlayable
 
sc2::Point2D m_centerPlayable
 
size_t m_width
 
size_t m_height
 

Static Protected Attributes

static std::unique_ptr< Mapm_gInstance
 

Detailed Description

is the overseer map that holds the most "important" functionality for a outside user.

Constructor & Destructor Documentation

◆ Map()

Overseer::Map::Map ( sc2::Agent *  bot)

constructor.

Parameters
botThe Starcraft II bot.

Member Function Documentation

◆ addRegion()

void Overseer::Map::addRegion ( Region  region)

Apends a region to the container.

Parameters
regionThe Region to apend.

◆ addTile()

void Overseer::Map::addTile ( sc2::Point2D &  pos,
std::shared_ptr< Tile tile 
)

Apends a tile to container.

Parameters
posThe tile position.
tileThe tile to add.

◆ getBot()

sc2::Agent* Overseer::Map::getBot ( ) const
inline

Gets the set agent.

Returns
pointer for agent.

◆ getClosestTilePosition()

TilePosition Overseer::Map::getClosestTilePosition ( sc2::Point2D  pos) const

Get the closest tile position.

Parameters
posof the tile position to find.
Returns
the found tile position.

◆ getDestructibles()

std::vector< TilePosition > Overseer::Map::getDestructibles ( )

Get tilePositions for Destructible objects.

Returns
vector containing TilePositions to Destructible objects.

◆ getFrontierPositions()

std::vector< std::shared_ptr< TilePosition > > Overseer::Map::getFrontierPositions ( ) const

Get tiles that is between two regions.

Returns
vector with tile position pointers.

◆ getGeysers()

std::vector< TilePosition > Overseer::Map::getGeysers ( )

Get all tilePosition for Geysers.

Returns
vector containing TilePositions to Geysers.

◆ getHeight()

size_t Overseer::Map::getHeight ( ) const

Gets the map height.

Returns
the height.

◆ getMinerals()

std::vector< TilePosition > Overseer::Map::getMinerals ( )

Get all tilePosition for Minerals.

Returns
vector containing TilePositions to Minerals.

◆ getNearestRegion()

const Region * Overseer::Map::getNearestRegion ( sc2::Point2D  pos)

Gets closest region to a specific point.

Parameters
posis the position point to find cloests the region to.
Returns
Pointer to the found region.

◆ getRawFrontier()

RawFrontier Overseer::Map::getRawFrontier ( ) const

region pair and frontier map.

Returns
vector of rawfrontier.

◆ getRegion()

Region * Overseer::Map::getRegion ( size_t  id)

Get a specific region.

Parameters
idThe id of the specific region.
Returns
The region with id as region id.

◆ getRegions()

std::vector< std::shared_ptr< Region > > Overseer::Map::getRegions ( )

Gets all the regions found.

Returns
vector of region pointers.

◆ getTile()

std::shared_ptr< Tile > Overseer::Map::getTile ( sc2::Point2D  pos)

Gets a tile based on the position.

Parameters
posThe position of the tile.
Returns
the tile that the position belongs to.

◆ getTilePositions()

TilePositionContainer Overseer::Map::getTilePositions ( ) const

Get all tile positions.

Returns
the tile position container.

◆ getWidth()

size_t Overseer::Map::getWidth ( ) const

Gets the map width.

Returns
the width.

◆ getXelNagas()

std::vector< TilePosition > Overseer::Map::getXelNagas ( )

Get all tilePosition for Xel'nagas watch towers.

Returns
vector containing TilePositions to Xal'nagas watch towers.

◆ setBot()

void Overseer::Map::setBot ( sc2::Agent *  bot)

set the bot into overseer

Parameters
botThe bot witch overseer will use.

◆ size()

size_t Overseer::Map::size ( ) const

Gets the size of the tile position container.

Returns
the size of container.

◆ valid()

bool Overseer::Map::valid ( sc2::Point2D  pos) const

Check if a position is on map.

Returns
True if position is within the map, false otherwise.

The documentation for this class was generated from the following files: