Represents the physical properties and behaviors of a cell in the simulation. Provides methods to calculate water height, water speed, and water absorption based on cell characteristics.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Calculates how much water is absorbed by the cell and updates the absorption rate.
Calculates how much water is absorbed by the cell and updates the absorption rate.
Value parameters
- currentAbsorption
-
the current absorption rate of the cell
- incomingWater
-
the volume of water entering the cell
Attributes
- Returns
-
a tuple containing the amount of water absorbed and the new absorption rate
Calculates the height of water in a cell.
Calculates the height of water in a cell.
Value parameters
- dimensions
-
the dimensions of the cell
- obstacles
-
the obstacles present in the cell
- waterVolume
-
the volume of water in the cell
Attributes
- Returns
-
the calculated height of the water
Calculates the speed at which water flows in a cell.
Calculates the speed at which water flows in a cell.
Value parameters
- absorption
-
the absorption rate of the cell
- dimensions
-
the dimensions of the cell
- obstacles
-
the obstacles present in the cell
- waterVolume
-
the volume of water in the cell
Attributes
- Returns
-
the calculated speed of the water