|
static int | updateFlow (Map< CellularDirection, Integer > flow, Map< CellularDirection, Integer > relevantContents, Map< CellularDirection, Integer > relevantCapacity) |
|
static int | updateFlowDown (Map< CellularDirection, Integer > flow, int contentsHere, Map< CellularDirection, WaterRegion > neighbourhood) |
|
static int | updateFlowAcross (Map< CellularDirection, Integer > flow, int contentsHere, Map< CellularDirection, WaterRegion > neighbourhood) |
|
static int | updateFlowHere (Map< CellularDirection, Integer > flow, int contentsHere, Map< CellularDirection, WaterRegion > neighbourhood) |
|
static int | updateFlowUp (Map< CellularDirection, Integer > flow, int contentsHere, Map< CellularDirection, WaterRegion > neighbourhood) |
|
Find all WaterRegions connected to the current region.
Update the flow given some contents to split between some directions in ratio with the capacities.
Update flow across and a bit down to simulate pressure at this level.
Create a 'flow' to the current cell. Any remaining can be pushed upwards.
Update flow up and a bit across and down to simulate pressure at the level above.
final int rabbitescape.engine.util.WaterUtil.COMPRESSION_FACTOR = 4 |
|
staticprivate |
A cell can hold 1/COMPRESSION_FACTOR extra if the cell above is full (assuming both have same capacity).
A fake water region, for referencing in situations where there is no water region in a given direction.
final int rabbitescape.engine.util.WaterUtil.HALF_CAPACITY = QUARTER_CAPACITY * 2 |
|
static |
The maximum capacity of water that can be held in a half empty tile without it overflowing.
final int rabbitescape.engine.util.WaterUtil.MAGIC_UP_DENOMINATOR = 20 |
|
staticprivate |
final int rabbitescape.engine.util.WaterUtil.MAGIC_UP_NUMERATOR = 11 |
|
staticprivate |
A magic constant for encouraging water to flow upwards.
final int rabbitescape.engine.util.WaterUtil.MAX_CAPACITY = HALF_CAPACITY * 2 |
|
static |
The maximum capacity of water that can be held in an empty tile without it overflowing.
final int rabbitescape.engine.util.WaterUtil.QUARTER_CAPACITY = 256 |
|
static |
The maximum capacity of water that can be held in a quarter empty tile without it overflowing.
final int rabbitescape.engine.util.WaterUtil.SOURCE_RATE = 512 |
|
static |
The default rate at which pipes produce water.
The documentation for this class was generated from the following file: