 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file.
4 #include "../engine/basics/Point.hxx"
5 #include "../engine/basics/tileData.hxx"
6 #include "../engine/GameObjects/MapGrid.hxx"
100 return (
xmin <= coordinate.
x) && (
xmax >= coordinate.
x) && (
ymin <= coordinate.
y) && (
ymax >= coordinate.
y);
void removeZoneNode(Point coordinate)
Remove a zoneNode on a given coordinate from this zoneArea.
bool isVacant() const
If this area has unoccupied nodes left.
bool checkVacancy() const
internal function to check for vacancy
bool isWithinBoundaries(Point coordinate) const
Check if a given point is within the boundaries of this zone area.
How many tiles are occupied by a building.
bool hasPowerSupply()
Get the Power supply for this Area.
friend void mergeZoneAreas(ZoneArea &mainZone, ZoneArea &toBeMerged)
void spawnBuildings()
Spawn buildings on nodes in this area if all demands are fulfilled.
static constexpr Point INVALID()
ZoneDensity getZoneDensity()
Get the zone density for this Area.
ZoneType getZone() const
Get the zone for this Area.
void mergeZoneAreas(ZoneArea &mainZone, ZoneArea &toBeMerged)
void setVacancy(Point coordinate, bool vacancy)
Set vacancy for this tile.
ZoneDensity m_zoneDensity
void setPowerSupply(bool hasPower)
Set the power supply for this Area.
ZoneArea(ZoneNode zoneNode)
void setWaterSupply(bool hasWater)
Set the water supply for this Area.
bool hasWaterSupply()
Get the water supply for this Area.
void addNode(ZoneNode zoneNode) override
Add a zoneNode to this zoneArea.
TileSize getMaximumTileSize(Point originPoint)
Returns the possible size of buildings that can be placed on this coordinate in a zone.