model.entities.customers

Members list

Type members

Classlikes

trait Bankroll[T <: Bankroll[T]]

Defines the contract for an entity that possesses a bankroll (money).

Defines the contract for an entity that possesses a bankroll (money).

This trait tracks the entity's current financial balance and its initial starting balance, providing methods to update the bankroll and calculate its ratio relative to the start.

Type parameters

T

The concrete type of the entity that extends this trait, enabling F-bounded polymorphism for immutable updates.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Customer
sealed trait BetStratType

Defines the types of betting strategies.

Defines the types of betting strategies.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FlatBet
object Martingale
object OscarGrind
trait BettingStrategy[A <: Bankroll[A] & CustomerState[A]]

Defines the common interface and properties for all betting strategies.

Defines the common interface and properties for all betting strategies.

Betting strategies are responsible for determining the bet amount and options, and for updating their internal state based on game outcomes.

Type parameters

A

The type of the entity (customer) that uses this strategy. It must have Bankroll and CustomerState capabilities.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FlatBetting[A]
class MartingaleStrat[A]
class OscarGrindStrat[A]

Defines the contract for an entity that experiences boredom and frustration.

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

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Customer
enum CustState

Enumeration representing the possible states of a customer.

Enumeration representing the possible states of a customer.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Customer(id: String, position: Vector2D, direction: Vector2D, bankroll: Double, startingBankroll: Double, boredom: Double, frustration: Double, riskProfile: RiskProfile, customerState: CustState, betStrategy: BettingStrategy[Customer], favouriteGame: GameType, previousPosition: Option[Vector2D]) extends Entity, MovableWithPrevious[Customer], Bankroll[Customer], BoredomFrustration[Customer], StatusProfile, CustomerState[Customer], HasBetStrategy[Customer], ChangingFavouriteGamePlayer[Customer]

The Customer is an entity which moves around the casino and plays games.

The Customer is an entity which moves around the casino and plays games.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Player[Customer]
trait Movable[Customer]
trait Positioned
trait Entity
class Object
trait Matchable
class Any
Show all
trait CustomerState[T <: CustomerState[T]]

Defines the contract for an entity that possesses a customer state.

Defines the contract for an entity that possesses a customer state.

This trait tracks whether a customer is Playing a game or Idle, providing methods to change this state and query their current activity.

Type parameters

T

The concrete type of the entity that extends this trait, enabling F-bounded polymorphism for immutable updates.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Customer
case class DefaultMovementManager(maxSpeed: Double, perceptionRadius: Double, avoidRadius: Double, alignmentWeight: Double, cohesionWeight: Double, separationWeight: Double, gamesAttractivenessWeight: Double, sittingRadius: Double, boredomIncrease: Double, randomMovementWeight: Double) extends BaseManager[SimulationState]

This manager implements the default behaviour for the customer. It combines the boid-like behaviours, the games' attractiveness and avoids the collisions of customers with walls and games

This manager implements the default behaviour for the customer. It combines the boid-like behaviours, the games' attractiveness and avoids the collisions of customers with walls and games

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object FlatBet extends BetStratType

Represents a Flat Betting strategy type.

Represents a Flat Betting strategy type.

Attributes

Supertypes
trait BetStratType
class Object
trait Matchable
class Any
Self type
FlatBet.type
case class FlatBetting[A <: Bankroll[A] & CustomerState[A]](betAmount: Double, option: List[Int]) extends BettingStrategy[A]

Implements a Flat Betting strategy. The bet amount remains constant regardless of previous game outcomes.

Implements a Flat Betting strategy. The bet amount remains constant regardless of previous game outcomes.

Type parameters

A

The entity type using this strategy.

Value parameters

betAmount

The fixed amount to bet.

option

Game-specific options for the bet.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait BettingStrategy[A]
class Object
trait Matchable
class Any
Show all
object FlatBetting

Companion object for FlatBetting, providing convenient factory methods.

Companion object for FlatBetting, providing convenient factory methods.

Attributes

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

Defines a contract for entities that possess a betting strategy.

Defines a contract for entities that possess a betting strategy.

This trait facilitates the integration of dynamic betting behaviors into entities that manage their own bankroll and customer state. It ensures that such entities can place bets, update their strategy based on outcomes, and change strategies.

Type parameters

T

The concrete type of the entity that extends this trait. It must also have Bankroll, CustomerState, and be able to provide a new instance with a changed betting strategy.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Customer
Self type
T
object Martingale extends BetStratType

Represents a Martingale strategy type.

Represents a Martingale strategy type.

Attributes

Supertypes
trait BetStratType
class Object
trait Matchable
class Any
Self type
Martingale.type
case class MartingaleStrat[A <: Bankroll[A] & CustomerState[A]](baseBet: Double, betAmount: Double, lossStreak: Int, option: List[Int]) extends BettingStrategy[A]

Implements the Martingale betting strategy. The bet amount doubles after each loss and resets to base after a win.

Implements the Martingale betting strategy. The bet amount doubles after each loss and resets to base after a win.

Type parameters

A

The entity type using this strategy.

Value parameters

baseBet

The initial bet amount to which the strategy resets after a win.

betAmount

The current bet amount for the next round.

lossStreak

The current number of consecutive losses.

option

Game-specific options for the bet.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait BettingStrategy[A]
class Object
trait Matchable
class Any
Show all

Companion object for MartingaleStrat, providing convenient factory methods.

Companion object for MartingaleStrat, providing convenient factory methods.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Movable[T <: Movable[T]] extends Positioned

Defines the contract for an entity that can move within the simulation environment.

Defines the contract for an entity that can move within the simulation environment.

This trait extends Positioned, adding the concept of a direction vector and methods to update both position and direction.

Type parameters

T

The concrete type of the entity that extends this trait, enabling F-bounded polymorphism for immutable updates.

Attributes

Supertypes
trait Positioned
class Object
trait Matchable
class Any
Known subtypes
class Customer
trait Player[T]
class Context[M]
trait MovableWithPrevious[M <: MovableWithPrevious[M]] extends Movable[M]

Attributes

Supertypes
trait Movable[M]
trait Positioned
class Object
trait Matchable
class Any
Known subtypes
class Customer
object OscarGrind extends BetStratType

Represents an Oscar Grind strategy type.

Represents an Oscar Grind strategy type.

Attributes

Supertypes
trait BetStratType
class Object
trait Matchable
class Any
Self type
OscarGrind.type
case class OscarGrindStrat[A <: Bankroll[A] & CustomerState[A]](baseBet: Double, betAmount: Double, startingBankroll: Double, lossStreak: Int, option: List[Int]) extends BettingStrategy[A]

Implements the Oscar's Grind betting strategy. Aims for a single unit profit per cycle, adjusting bets based on wins and losses.

Implements the Oscar's Grind betting strategy. Aims for a single unit profit per cycle, adjusting bets based on wins and losses.

Type parameters

A

The entity type using this strategy.

Value parameters

baseBet

The base unit bet amount.

betAmount

The current bet amount for the next round.

lossStreak

The current number of consecutive losses (not always used directly in bet calculation for Oscar Grind).

option

Game-specific options for the bet.

startingBankroll

The bankroll at the start of the current Oscar Grind cycle.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait BettingStrategy[A]
class Object
trait Matchable
class Any
Show all

Companion object for OscarGrindStrat, providing convenient factory methods.

Companion object for OscarGrindStrat, providing convenient factory methods.

Attributes

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

Enumeration representing different risk profiles for customers.

Enumeration representing different risk profiles for customers.

These profiles categorize customers' willingness to take risks and influence their decision-making, betting strategies, and reactions to game outcomes.

Attributes

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

Defines the contract for an entity that possesses a risk profile.

Defines the contract for an entity that possesses a risk profile.

This trait is used to categorize customers based on their behavior patterns within the casino, influencing decisions made by managers like the DecisionManager.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Customer

Value members

Concrete methods

def defaultRedBet: List[Int]

Default options for a red bet in Roulette.

Default options for a red bet in Roulette.

Attributes