model.entities.customers.BoredomFrustration
Defines the contract for an entity that experiences boredom and frustration.
This trait allows entities to track and update their emotional states, which can influence their decisions and behavior in the simulation. Boredom and frustration values are typically represented as percentages (0-100).
Type parameters
T
The concrete type of the entity that extends this trait, enabling F-bounded polymorphism for immutable updates.
Attributes
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Members list
Returns a new instance of the entity with an updated boredom level. This method must be implemented by concrete classes to ensure immutability.
Returns a new instance of the entity with an updated boredom level. This method must be implemented by concrete classes to ensure immutability.
Value parameters
newBoredom
The new boredom level.
Attributes
Returns
A new instance of the entity with the new boredom level.
Returns a new instance of the entity with an updated frustration level. This method must be implemented by concrete classes to ensure immutability.
Returns a new instance of the entity with an updated frustration level. This method must be implemented by concrete classes to ensure immutability.
Value parameters
newFrustration
The new frustration level.
Attributes
Returns
A new instance of the entity with the new frustration level.
Updates the entity's boredom level by adding a boredomGain. The new boredom level is clamped between 0.0 and 100.0.
Updates the entity's boredom level by adding a boredomGain. The new boredom level is clamped between 0.0 and 100.0.
Value parameters
boredomGain
The amount to add to the current boredom level. Can be positive or negative.
Attributes
Returns
A new instance of the entity with the updated boredom level.
Updates the entity's frustration level by adding a frustrationGain. The new frustration level is clamped between 0.0 and 100.0.
Updates the entity's frustration level by adding a frustrationGain. The new frustration level is clamped between 0.0 and 100.0.
Value parameters
frustrationGain
The amount to add to the current frustration level. Can be positive or negative.
Attributes
Returns
A new instance of the entity with the updated frustration level.
The current boredom level of the entity (0.0 - 100.0).
The current boredom level of the entity (0.0 - 100.0).
Attributes
The current frustration level of the entity (0.0 - 100.0).
The current frustration level of the entity (0.0 - 100.0).
Attributes