SimulationState

model.SimulationState
See theSimulationState companion object
case class SimulationState(customers: Seq[Customer], games: List[Game], spawner: Option[Spawner], walls: List[Wall], ticker: Ticker, frameRate: Double)

Represents the complete state of the casino simulation at a given point in time.

SimulationState encapsulates all entities and components that make up the simulation, including customers, games, spawners, walls, and timing information. It serves as the central data structure that is passed between simulation updates, maintaining immutability for predictable state transitions.

The state includes all dynamic entities (customers, games) as well as static environment elements (walls) that define the simulation's physical boundaries and collision detection.

Value parameters

customers

sequence of all customer entities currently in the simulation

games

list of all game entities available for interaction

spawner

optional spawner entity for creating new customers

ticker

timing coordinator for managing simulation updates and scheduling

walls

list of wall entities that define physical boundaries

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Extension method from model

Creates a new SimulationState with an additional customer.

Creates a new SimulationState with an additional customer.

Value parameters

customer

the customer entity to add

Attributes

Returns

new SimulationState including the specified customer

Extension method from model

Creates a new SimulationState with an additional game.

Creates a new SimulationState with an additional game.

Games are prepended to the list for efficient insertion.

Value parameters

game

the game entity to add

Attributes

Returns

new SimulationState including the specified game

Extension method from model

Creates a new SimulationState with an additional wall.

Creates a new SimulationState with an additional wall.

Walls are prepended to the list for efficient insertion.

Value parameters

wall

the wall entity to add

Attributes

Returns

new SimulationState including the specified wall

Extension method from model

Creates a new SimulationState with an updated spawner.

Creates a new SimulationState with an updated spawner.

Value parameters

spawner

the spawner entity to set

Attributes

Returns

new SimulationState with the specified spawner

def updateFrameRate(frameRate: Double): SimulationState
Extension method from model

Creates a new SimulationState with an updated framerate.

Creates a new SimulationState with an updated framerate.

Ticker is updated according to framerate

Value parameters

frameRate

the new framerate

Attributes

Returns

new SimulationState with the new framerate

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product