OscarGrindStrat

model.entities.customers.OscarGrindStrat
See theOscarGrindStrat companion object
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.

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait BettingStrategy[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def betType: BetStratType

Returns the type of this betting strategy.

Returns the type of this betting strategy.

Attributes

Returns

The BetStratType for this strategy.

Definition Classes
override def placeBet(ctx: A): Bet

Generates a game-specific bet for Oscar's Grind strategy. Currently supports Roulette and Blackjack.

Generates a game-specific bet for Oscar's Grind strategy. Currently supports Roulette and Blackjack.

Value parameters

ctx

The customer entity's context.

Attributes

Returns

A Bet object.

Throws
MatchError

if the customer state is not Playing or game type is unsupported.

Definition Classes
override def updateAfter(ctx: A, result: Double): OscarGrindStrat[A]

Updates the Oscar's Grind strategy's state based on the game result. Logic:

Updates the Oscar's Grind strategy's state based on the game result. Logic:

  • If current bankroll exceeds startingBankroll, cycle profit achieved: reset betAmount to baseBet, update startingBankroll.
  • If result is positive (win) and no profit goal reached: increase betAmount by baseBet.
  • If result is zero (push): state remains unchanged.
  • If result is negative (loss): increment lossStreak (betAmount remains constant).

Value parameters

ctx

The customer entity's context.

result

The outcome of the game round.

Attributes

Returns

A new OscarGrindStrat instance with updated state.

Definition Classes

Inherited methods

protected def checkRequirement(ctx: A): Unit

Checks preconditions before placing a bet. Throws a require error if the bet amount exceeds bankroll or if the customer is not in a Playing state.

Checks preconditions before placing a bet. Throws a require error if the bet amount exceeds bankroll or if the customer is not in a Playing state.

Value parameters

ctx

The customer entity's context.

Attributes

Inherited from:
BettingStrategy
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product