Model

io.github.srs.model.ModelModule.Model
trait Model[S <: State]

Trait representing the core model logic for updating the simulation state.

Type parameters

S

the type of the simulation state, which must extend State.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def update(s: S)(using f: S => IO[S]): IO[S]

Updates the state of the simulation using the provided function.

Updates the state of the simulation using the provided function.

Value parameters

f

the function that takes the current state and returns a new state wrapped in a IO.

s

the current state of the simulation.

Attributes

Returns

the updated state wrapped in a IO.