CellFactory

floodsim.model.cell.CellFactory
object CellFactory

Factory for creating different types of cells with appropriate configurations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(cellType: CellType)(using physics: CellPhysics): Cell

Creates a new cell of the specified type. Automatically configures the cell's properties based on its type, including obstacles, absorption rate, and altitude range.

Creates a new cell of the specified type. Automatically configures the cell's properties based on its type, including obstacles, absorption rate, and altitude range.

Value parameters

cellType

the type of cell to create

physics

the physics engine to use for the cell

Attributes

Returns

a new Cell instance of the specified type