SimulationState

model.SimulationState
See theSimulationState companion class

Factory and utility object for creating SimulationState instances.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class Builder(customers: Seq[Customer], games: List[Game], spawner: Option[Spawner], walls: List[Wall])

Builder class for constructing SimulationState instances using a fluent API.

Builder class for constructing SimulationState instances using a fluent API.

Provides a convenient way to incrementally build complex simulation states by adding entities one at a time or in groups. The builder pattern ensures that all required components can be configured before creating the final immutable state.

Value parameters

customers

current collection of customer entities

games

current collection of game entities

spawner

optional spawner entity

walls

current collection of wall entities

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def base(x: Double, y: Double, length: Double, height: Double): SimulationState

Creates a simulation state with a rectangular boundary defined by walls.

Creates a simulation state with a rectangular boundary defined by walls.

Constructs a basic casino floor layout with walls forming a rectangular enclosure. The walls have a standard width of 5.0 units and are positioned to create a complete boundary around the specified area.

The wall configuration creates:

  • Top wall: full width across the top edge
  • Left wall: full height minus wall width on the left edge
  • Right wall: full height minus wall width on the right edge
  • Bottom wall: width minus 2×wall width at the bottom (accounting for side walls)

Value parameters

height

the total height of the enclosed area

length

the total width of the enclosed area

x

the x-coordinate of the top-left corner

y

the y-coordinate of the top-left corner

Attributes

Returns

SimulationState with boundary walls and default settings

def builder(): Builder

Creates a new empty builder for constructing SimulationState instances.

Creates a new empty builder for constructing SimulationState instances.

Attributes

Returns

new Builder with empty collections for all entity types

Creates an empty simulation state with no entities.

Creates an empty simulation state with no entities.

Useful as a starting point for building custom simulation configurations or for resetting the simulation to a clean state.

Attributes

Returns

empty SimulationState with default ticker at 60 FPS