FastEcslent::MineralPatch Class Reference

#include <buildings.h>

List of all members.

Public Member Functions

 MineralPatch (int id)
void addMineral (Minerals *m)
MineralsgetNextMineral (Minerals *m)
int getID ()
void addMineral (Minerals *m)
MineralsgetNextMineral (Minerals *m)
void addMineral (Minerals *m)
MineralsgetNextMineral (Minerals *m)
void addMineral (Minerals *m)
MineralsgetNextMineral (Minerals *m)
void addMineral (Minerals *m)
MineralsgetNextMineral (Minerals *m)

Private Attributes

std::vector< Minerals * > minerals
int patchID
std::vector< Minerals * > minerals
std::vector< Minerals * > minerals
std::vector< Minerals * > minerals
std::vector< Minerals * > minerals


Detailed Description

Class MineralPatch GameMgr has to create a patch of minerals Every mineral belongs to a MineralPatch
See also:
Minerals

Definition at line 264 of file buildings.h.


Constructor & Destructor Documentation

FastEcslent::MineralPatch::MineralPatch ( int  id  )  [inline]

Definition at line 269 of file buildings.h.


Member Function Documentation

void FastEcslent::MineralPatch::addMineral ( Minerals m  )  [inline]

Add mineral to a this patch

Parameters:
m the minerals to add

Definition at line 274 of file buildings.h.

References minerals.

Referenced by FastEcslent::GameMgr::createMineralPatch(), and FastEcslent::GameMgr::initMineralPatch().

FastEcslent::Minerals * FastEcslent::MineralPatch::getNextMineral ( Minerals m  ) 

Get another optimal mineral within the same patch

Returns:
the optimal mineral which has fewer miners mining. return 0 if there is no better choice.

Definition at line 86 of file buildings.cpp.

References minerals, FastEcslent::Minerals::miners, and FastEcslent::Entity::pos.

Referenced by FastEcslent::Gather::moveToEntityTick().

int FastEcslent::MineralPatch::getID (  )  [inline]

Get ID of this mineral patch

Definition at line 286 of file buildings.h.

References patchID.

Referenced by FastEcslent::GameMgr::createMineralPatch().

void FastEcslent::MineralPatch::addMineral ( Minerals m  )  [inline]

Add mineral to a this patch

Parameters:
m the minerals to add

Definition at line 254 of file buildings.h.

References minerals.

Minerals* FastEcslent::MineralPatch::getNextMineral ( Minerals m  ) 

Get another optimal mineral within the same patch

Returns:
the optimal mineral which has fewer miners mining. return 0 if there is no better choice.

void FastEcslent::MineralPatch::addMineral ( Minerals m  )  [inline]

Add mineral to a this patch

Parameters:
m the minerals to add

Definition at line 254 of file buildings.h.

References minerals.

Minerals* FastEcslent::MineralPatch::getNextMineral ( Minerals m  ) 

Get another optimal mineral within the same patch

Returns:
the optimal mineral which has fewer miners mining. return 0 if there is no better choice.

void FastEcslent::MineralPatch::addMineral ( Minerals m  )  [inline]

Add mineral to a this patch

Parameters:
m the minerals to add

Definition at line 254 of file buildings.h.

References minerals.

Minerals* FastEcslent::MineralPatch::getNextMineral ( Minerals m  ) 

Get another optimal mineral within the same patch

Returns:
the optimal mineral which has fewer miners mining. return 0 if there is no better choice.

void FastEcslent::MineralPatch::addMineral ( Minerals m  )  [inline]

Add mineral to a this patch

Parameters:
m the minerals to add

Definition at line 254 of file buildings.h.

References minerals.

Minerals* FastEcslent::MineralPatch::getNextMineral ( Minerals m  ) 

Get another optimal mineral within the same patch

Returns:
the optimal mineral which has fewer miners mining. return 0 if there is no better choice.


Member Data Documentation

std::vector<Minerals*> FastEcslent::MineralPatch::minerals [private]

Definition at line 266 of file buildings.h.

Referenced by addMineral(), and getNextMineral().

int FastEcslent::MineralPatch::patchID [private]

Definition at line 267 of file buildings.h.

Referenced by getID().

std::vector<Minerals*> FastEcslent::MineralPatch::minerals [private]

Definition at line 248 of file buildings.h.

std::vector<Minerals*> FastEcslent::MineralPatch::minerals [private]

Definition at line 248 of file buildings.h.

std::vector<Minerals*> FastEcslent::MineralPatch::minerals [private]

Definition at line 248 of file buildings.h.

std::vector<Minerals*> FastEcslent::MineralPatch::minerals [private]

Definition at line 248 of file buildings.h.


The documentation for this class was generated from the following files:
Generated on Fri Dec 13 14:54:20 2013 for FastECSLent by  doxygen 1.5.4