PostDecisionUpdater

model.managers.PostDecisionUpdater

An object responsible for updating the simulation environment after customer decisions have been made.

This component handles "side effects" such as updating customer positions, changing their favorite games, and unlocking casino games, maintaining a functional separation from the core decision-making logic.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def updateGames[P <: CustomerState[LazyRef(...)] & Entity](before: Seq[P], post: Seq[P], games: List[Game]): List[Game]

Updates the state of casino games, specifically unlocking games that were previously occupied by customers who have now stopped playing.

Updates the state of casino games, specifically unlocking games that were previously occupied by customers who have now stopped playing.

Type parameters

P

The type of customer entity, which must have CustomerState and Entity capabilities.

Value parameters

before

The sequence of customer entities before decision processing.

games

The list of all available Game entities in the casino.

post

The sequence of customer entities after decision processing.

Attributes

Returns

A list of updated Game entities.

def updatePosition[P <: MovableWithPrevious[LazyRef(...)] & CustomerState[LazyRef(...)] & ChangingFavouriteGamePlayer[LazyRef(...)] & Entity](before: Seq[P], post: Seq[P]): List[P]

Updates the physical position and favorite game of customers who have stopped playing. Customers who transition from 'Playing' to 'Idle' are moved back to their previous position and assigned a new random favorite game.

Updates the physical position and favorite game of customers who have stopped playing. Customers who transition from 'Playing' to 'Idle' are moved back to their previous position and assigned a new random favorite game.

Type parameters

P

The type of customer entity, which must have MovableWithPrevious, CustomerState, ChangingFavouriteGamePlayer, and Entity capabilities.

Value parameters

before

The sequence of customer entities before decision processing.

post

The sequence of customer entities after decision processing.

Attributes

Returns

A list of updated customer entities with their new positions and favorite games.