jadex.examples.blackjack.player.strategies
Class StochasticTable
java.lang.Object
jadex.examples.blackjack.player.strategies.AbstractStrategy
jadex.examples.blackjack.player.strategies.StochasticTable
- All Implemented Interfaces:
- IStrategy
public class StochasticTable
- extends AbstractStrategy
The stochastic table strategy.
Method Summary |
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. |
StochasticTable
public StochasticTable(String name)
- Create a new strategy.
- Parameters:
name
- The name.
makeBet
public int makeBet(int account)
- Calculate how much to bet, given the account value.
- Specified by:
makeBet
in interface IStrategy
- Specified by:
makeBet
in class AbstractStrategy
- Parameters:
account
-
- Returns:
- The bet.
drawCard
public boolean drawCard(Card[] playercards,
Card dealercard)
- Decide if to draw another card.
- Specified by:
drawCard
in interface IStrategy
- Specified by:
drawCard
in class AbstractStrategy
- Parameters:
playercards
- dealercard
-
- Returns:
- True, if the player wants to draw a card.
Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples. Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.