BlackJackStrategyBuilder

model.entities.games.BlackJackStrategyBuilder
case class BlackJackStrategyBuilder(betAmount: Option[Double], minimumVal: Option[Int], condition: Option[() => Boolean])

Builder for constructing blackjack betting strategies.

Uses the builder pattern to configure bet amounts, minimum hand values, and conditions before creating the final strategy instance.

Value parameters

betAmount

optional bet amount (defaults to 0.5 if not specified)

condition

optional execution condition function

minimumVal

optional minimum hand value threshold (defaults to 17 if not specified)

Attributes

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

Members list

Value members

Concrete methods

def accept(minimum: Int): BlackJackStrategyBuilder

Sets the minimum hand value threshold for the player strategy.

Sets the minimum hand value threshold for the player strategy.

Value parameters

minimum

the minimum hand value the player will accept before standing

Attributes

Returns

updated builder with the specified minimum value

def bet(amount: Double): BlackJackStrategyBuilder

Sets the betting amount for the strategy.

Sets the betting amount for the strategy.

Value parameters

amount

the monetary amount to bet (must be positive)

Attributes

Returns

updated builder with the specified bet amount

Throws
IllegalArgumentException

if amount is not positive

def when(cond: => Boolean): BlackJackStrategyInstance

Sets the execution condition and creates the final strategy instance.

Sets the execution condition and creates the final strategy instance.

Value parameters

cond

the condition under which the strategy should execute

Attributes

Returns

configured BlackJackStrategyInstance ready for execution

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product