![]() |
Cytopia
0.3
A city building simulation game
|
#include <PowerGrid.hxx>
Public Member Functions | |
PowerGrid (PowerNode powerNode) | |
int | getPowerLevel () const |
Get the Power Level of this grid. More... | |
void | updatePowerLevel () |
Recalculate the power level of this power grid. More... | |
![]() | |
MapGrid (PowerNode node) | |
virtual | ~MapGrid ()=0 |
size_t | size () |
virtual void | addNode (PowerNode node) |
Add a T node to this gridnode. More... | |
virtual void | removeNode (Point coordinate) |
Remove a node on a given coordinate from this gridnode. More... | |
bool | isNeighbor (Point coordinate) const |
If this coordinate is a neighbor of one of the node in the grid. More... | |
bool | isMemberOf (Point coordinate) const |
If this coordinate is part of the grid. More... | |
auto | begin () |
auto | end () |
Private Attributes | |
int | m_powerLevel = 0 |
Friends | |
void | mergePowerGrids (PowerGrid &mainGrid, PowerGrid &toBeMerged) |
Additional Inherited Members | |
![]() | |
std::vector< PowerNode > | m_gridNodes |
Definition at line 17 of file PowerGrid.hxx.
PowerGrid::PowerGrid | ( | PowerNode | powerNode | ) |
Definition at line 5 of file PowerGrid.cxx.
|
inline |
Get the Power Level of this grid.
Definition at line 27 of file PowerGrid.hxx.
void PowerGrid::updatePowerLevel | ( | ) |
Recalculate the power level of this power grid.
Definition at line 12 of file PowerGrid.cxx.
Definition at line 7 of file PowerGrid.cxx.
|
private |
Definition at line 38 of file PowerGrid.hxx.