Jadex 0.96

jadex.examples.blackjack.player.strategies
Class StochasticTable

java.lang.Object
  extended by jadex.examples.blackjack.player.strategies.AbstractStrategy
      extended by jadex.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.examples.blackjack.player.strategies.AbstractStrategy
CONSTANT_CAREFUL, CONSTANT_RISKY, CONSTANT_VERY_CAREFUL, CONSTANT_VERY_RISKY, HUMAN_PLAYER, STOCHASTIC_TABLE
 
Constructor Summary
StochasticTable(String name)
          Create a new 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.
 
Methods inherited from class jadex.examples.blackjack.player.strategies.AbstractStrategy
equals, getName, getStrategies, getStrategy, getStrategyNames, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StochasticTable

public StochasticTable(String name)
Create a new strategy.

Parameters:
name - The name.
Method Detail

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.

Jadex 0.96

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.