public class ConstantStrategy extends AbstractStrategy
| Modifier and Type | Field and Description |
|---|---|
protected int |
bet
The bet.
|
protected int |
drawlimit
The draw limit.
|
CONSTANT_CAREFUL, CONSTANT_RISKY, CONSTANT_VERY_CAREFUL, CONSTANT_VERY_RISKY, HUMAN_PLAYER, name, STOCHASTIC_TABLE, strategies| Constructor and Description |
|---|
ConstantStrategy(java.lang.String name,
int bet,
int drawlimit)
Create a new strategy.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
drawCard(Card[] agentcards,
Card dealercard)
Depending on the strategy, this methods decides whether to draw one more card or not.
|
int |
makeBet(int account)
Depending on the strategy, this methods calculates the bet-amount.
|
equals, getName, getStrategies, getStrategy, getStrategyNames, hashCode, toStringpublic ConstantStrategy(java.lang.String name,
int bet,
int drawlimit)
name - The strategy name.bet - The bet value.drawlimit - The draw limit.public int makeBet(int account)
makeBet in interface IStrategymakeBet in class AbstractStrategyaccount - The account-status of the player.public boolean drawCard(Card[] agentcards, Card dealercard)
drawCard in interface IStrategydrawCard in class AbstractStrategyagentcards - A String-array containing all the players cards.dealercard - This String represents the dealer's open card.