org.jscience.computing.game.cards
Class BJPlayer

java.lang.Object
  extended by org.jscience.computing.game.TemplatePlayer
      extended by org.jscience.computing.game.cards.BJPlayer
All Implemented Interfaces:
java.io.Serializable, Player
Direct Known Subclasses:
BJCheater

public class BJPlayer
extends TemplatePlayer

adds AI to the game BlackJack

See Also:
BlackJack, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jscience.computing.game.TemplatePlayer
TemplatePlayer.MoveEvaluater, TemplatePlayer.Synchronizer
 
Field Summary
 
Fields inherited from class org.jscience.computing.game.TemplatePlayer
levelOverwrite, monitors, orderMoves, playerName, SEARCH_ALPHABETA, SEARCH_MINMAX, searchOption
 
Constructor Summary
BJPlayer()
          Creates a new BJPlayer object.
BJPlayer(java.lang.String playerName)
          Creates a new BJPlayer object.
BJPlayer(java.lang.String playerName, boolean trackingEnabled)
          Creates a new BJPlayer object.
 
Method Summary
 boolean canPlayGame(GamePlay game)
          DOCUMENT ME!
 double heuristic(GamePlay game, GameMove move, int[] role)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.computing.game.TemplatePlayer
disableTracking, enableTracking, evaluate, evaluate, getLevelOverwrite, getMonitors, getOrderMoves, getPlayerName, getSearchOption, numberOfPositionsSearched, numberOfRequests, performanceRatio, pruneMove, selectMove, setLevelOverwrite, setOrderMoves, setPlayerName, setSearchOption, setTracking, statsAsString, toString, totalTimeTaken, trackingEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BJPlayer

public BJPlayer()
Creates a new BJPlayer object.


BJPlayer

public BJPlayer(java.lang.String playerName)
Creates a new BJPlayer object.

Parameters:
playerName - DOCUMENT ME!

BJPlayer

public BJPlayer(java.lang.String playerName,
                boolean trackingEnabled)
Creates a new BJPlayer object.

Parameters:
playerName - DOCUMENT ME!
trackingEnabled - DOCUMENT ME!
Method Detail

canPlayGame

public boolean canPlayGame(GamePlay game)
DOCUMENT ME!

Parameters:
game - DOCUMENT ME!
Returns:
DOCUMENT ME!

heuristic

public double heuristic(GamePlay game,
                        GameMove move,
                        int[] role)
DOCUMENT ME!

Parameters:
game - DOCUMENT ME!
move - DOCUMENT ME!
role - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
TemplatePlayer