game.gamestorage.texas
Class SetGameStorage_TH

java.lang.Object
  extended by game.gamestorage.texas.SetGameStorage_TH
All Implemented Interfaces:
IF_SetGameStorage, IF_SetGameStorage_TH

public class SetGameStorage_TH
extends java.lang.Object
implements IF_SetGameStorage_TH


Field Summary
(package private)  java.lang.String botName
           
(package private)  SetterDBProjector sp
           
 
Constructor Summary
SetGameStorage_TH(java.lang.String botName)
           
 
Method Summary
 boolean connectionSuccess()
           
 void setEndCompetition(int[] ranking)
          Store information of the ending competition (placement of players, ...).
 void setEndHand(int finalpot, int[] cashDelta, Card[][] holeCards)
          Store information of the ending hand (winner, revealed holeCards, ...).
 void setEndRound(long timestamp, java.util.ArrayList<Action> betHistory, Card[] revealedBoardCards)
          Store information of the ending round.
 int setGetGamedef(int limited, int minBet, int maxBet, int numPlayers, int style, int buyin)
          gamedef_id is parameter of Estimation constructor
- need to estimate opponents by completed competitions
- called after instanciating History and before instanciating Estimation
 void setHand(int[] position, int sb, int bb, int ante, int[] cashInit, Card[] holeCards)
          Store information of the started hand.
 void setStartCompetition(java.lang.String[] players, int[] cash_init)
          Store information about the competion (gamedef, player names, ...).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

botName

java.lang.String botName

sp

SetterDBProjector sp
Constructor Detail

SetGameStorage_TH

public SetGameStorage_TH(java.lang.String botName)
Method Detail

setGetGamedef

public int setGetGamedef(int limited,
                         int minBet,
                         int maxBet,
                         int numPlayers,
                         int style,
                         int buyin)
Description copied from interface: IF_SetGameStorage
gamedef_id is parameter of Estimation constructor
- need to estimate opponents by completed competitions
- called after instanciating History and before instanciating Estimation

Specified by:
setGetGamedef in interface IF_SetGameStorage
Returns:
gamedef_id

setStartCompetition

public void setStartCompetition(java.lang.String[] players,
                                int[] cash_init)
Description copied from interface: IF_SetGameStorage
Store information about the competion (gamedef, player names, ...).
- limited:1; pot-limit:0; no-limit: -1 - participants (names, buy ins, positions)
-

Specified by:
setStartCompetition in interface IF_SetGameStorage

setHand

public void setHand(int[] position,
                    int sb,
                    int bb,
                    int ante,
                    int[] cashInit,
                    Card[] holeCards)
Description copied from interface: IF_SetGameStorage_TH
Store information of the started hand.
- own holeCards
-

Specified by:
setHand in interface IF_SetGameStorage_TH

setEndRound

public void setEndRound(long timestamp,
                        java.util.ArrayList<Action> betHistory,
                        Card[] revealedBoardCards)
Description copied from interface: IF_SetGameStorage_TH
Store information of the ending round.
(if it is the last round of a hand, setEndHand will be called after this)
- bet gameStorage
- revealed board cards
-

Specified by:
setEndRound in interface IF_SetGameStorage_TH

setEndHand

public void setEndHand(int finalpot,
                       int[] cashDelta,
                       Card[][] holeCards)
Description copied from interface: IF_SetGameStorage_TH
Store information of the ending hand (winner, revealed holeCards, ...).
(no player actions)
- amount won by player
- revealed hole cards (if revealed)
-

Specified by:
setEndHand in interface IF_SetGameStorage_TH

setEndCompetition

public void setEndCompetition(int[] ranking)
Description copied from interface: IF_SetGameStorage
Store information of the ending competition (placement of players, ...).
(no player actions or card information)
- player ranking

Specified by:
setEndCompetition in interface IF_SetGameStorage

connectionSuccess

public boolean connectionSuccess()
Returns:
true, if there is at least one connection to the db