Spawner

model.entities.spawner.Spawner
case class Spawner(id: String, position: Vector2D, strategy: SpawningStrategy) extends Entity

Entity responsible for spawning new customers into the simulation.

The Spawner periodically creates new Customer instances based on its configured spawning strategy and timing parameters. It maintains its own simulation time counter and determines when to spawn customers based on the ticksToSpawn interval.

Spawned customers are created with randomized attributes including position, movement direction, bankroll, and preferred game type to simulate realistic diversity in the casino environment.

Value parameters

id

unique identifier for this spawner instance

position

2D coordinates where customers will be spawned (with random variation)

strategy

the spawning strategy that determines how many customers to create

Attributes

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

Members list

Value members

Concrete methods

Processes a simulation tick, potentially spawning new customers.

Processes a simulation tick, potentially spawning new customers.

Checks if the current time interval matches the spawning schedule and, if so, creates new customers according to the spawning strategy.

Value parameters

state

the current simulation state containing customers and spawner

Attributes

Returns

updated simulation state with potentially new customers and updated spawner time

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product