Class StochasticTable
- java.lang.Object
-
- jadex.bdi.examples.blackjack.player.strategies.AbstractStrategy
-
- jadex.bdi.examples.blackjack.player.strategies.StochasticTable
-
- All Implemented Interfaces:
IStrategy
public class StochasticTable extends AbstractStrategy
The stochastic table strategy.
-
-
Field Summary
-
Fields inherited from class jadex.bdi.examples.blackjack.player.strategies.AbstractStrategy
CONSTANT_CAREFUL, CONSTANT_RISKY, CONSTANT_VERY_CAREFUL, CONSTANT_VERY_RISKY, HUMAN_PLAYER, name, STOCHASTIC_TABLE, strategies
-
-
Constructor Summary
Constructors Constructor Description StochasticTable(java.lang.String name)
Create a new strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
drawCard(Card[] playercards, Card dealercard)
Decide if to draw another card.int
makeBet(int account)
Calculate how much to bet, given the account value.-
Methods inherited from class jadex.bdi.examples.blackjack.player.strategies.AbstractStrategy
equals, getName, getStrategies, getStrategy, getStrategyNames, hashCode, toString
-
-
-
-
Method Detail
-
makeBet
public int makeBet(int account)
Calculate how much to bet, given the account value.- Specified by:
makeBet
in interfaceIStrategy
- Specified by:
makeBet
in classAbstractStrategy
- Parameters:
account
-- Returns:
- The bet.
-
-