|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.client.SOCDisplaylessPlayerClient
soc.robot.SOCRobotClient
This is a client that can play Settlers of Catan.
Field Summary | |
protected int |
cleanBrainKills
number of clean brain kills |
static java.lang.String |
CURRENT_PLANS
constants for debug recording |
static java.lang.String |
CURRENT_RESOURCES
|
protected int |
gamesFinished
number of games finished |
protected int |
gamesPlayed
number of games this bot has played |
protected int |
gamesWon
number of games this bot has won |
protected long |
startTime
start time |
Fields inherited from class soc.client.SOCDisplaylessPlayerClient |
channels, connected, doc, ex, games, gotPassword, host, in, lastMessage, nickname, out, password, port, s, STATSPREFEX |
Constructor Summary | |
SOCRobotClient(java.lang.String h,
int p,
java.lang.String nn,
java.lang.String pw)
Constructor for connecting to the specified host, on the specified port |
Method Summary | |
void |
addCleanKill()
add one the the number of clean brain kills |
void |
destroy()
destroy the applet |
void |
disconnectReconnect()
disconnect and then try to reconnect |
protected void |
handleACCEPTOFFER(SOCAcceptOffer mes)
handle the "accept offer" message |
protected void |
handleADMINPING(SOCAdminPing mes)
handle the admin ping message |
protected void |
handleADMINRESET(SOCAdminReset mes)
handle the admin reset message |
protected void |
handleBOARDLAYOUT(SOCBoardLayout mes)
handle the "board layout" message |
protected void |
handleCHANGEFACE(SOCChangeFace mes)
handle the "change face" message |
protected void |
handleCHOOSEPLAYERREQUEST(SOCChoosePlayerRequest mes)
handle the "choose player request" message |
protected void |
handleCLEAROFFER(SOCClearOffer mes)
handle the "clear offer" message |
protected void |
handleCLEARTRADEMSG(SOCClearTradeMsg mes)
handle the "clear trade" message |
protected void |
handleDELETEGAME(SOCDeleteGame mes)
handle the "delete game" message |
protected void |
handleDEVCARD(SOCDevCard mes)
handle the "development card action" message |
protected void |
handleDEVCARDCOUNT(SOCDevCardCount mes)
handle the "development card count" message |
protected void |
handleDICERESULT(SOCDiceResult mes)
handle the "dice result" message |
protected void |
handleDISCARDREQUEST(SOCDiscardRequest mes)
handle the "discard request" message |
protected void |
handleFIRSTPLAYER(SOCFirstPlayer mes)
handle the "set first player" message |
protected void |
handleGAMEMEMBERS(SOCGameMembers mes)
handle the "game members" message |
protected void |
handleGAMESTATE(SOCGameState mes)
handle the "game state" message |
protected void |
handleGAMETEXTMSG(SOCGameTextMsg mes)
handle the "game text message" message |
protected void |
handleJOINGAME(SOCJoinGame mes)
handle the "join game" message |
protected void |
handleJOINGAMEAUTH(SOCJoinGameAuth mes)
handle the "join game authorization" message |
protected void |
handleJOINGAMEREQUEST(SOCJoinGameRequest mes)
handle the "join game request" message |
protected void |
handleLARGESTARMY(SOCLargestArmy mes)
handle the "largest army" message |
protected void |
handleLEAVEGAME(SOCLeaveGame mes)
handle the "leave game" message |
protected void |
handleLONGESTROAD(SOCLongestRoad mes)
handle the "longest road" message |
protected void |
handleMAKEOFFER(SOCMakeOffer mes)
handle the "make offer" message |
protected void |
handleMOVEROBBER(SOCMoveRobber mes)
handle the "move robber" message |
protected void |
handlePLAYERELEMENT(SOCPlayerElement mes)
handle the "player element" message |
protected void |
handlePOTENTIALSETTLEMENTS(SOCPotentialSettlements mes)
handle the "potential settlements" message |
protected void |
handlePUTPIECE(SOCPutPiece mes)
handle the "put piece" message |
protected void |
handleREJECTOFFER(SOCRejectOffer mes)
handle the "reject offer" message |
protected void |
handleRESOURCECOUNT(SOCResourceCount mes)
handle "resource count" message |
protected void |
handleROBOTDISMISS(SOCRobotDismiss mes)
handle the "dismiss robot" message |
protected void |
handleSERVERPING(SOCServerPing mes)
handle the server ping message |
protected void |
handleSETPLAYEDDEVCARD(SOCSetPlayedDevCard mes)
handle the "set played development card" message |
protected void |
handleSETTURN(SOCSetTurn mes)
handle the "set turn" message |
protected void |
handleSITDOWN(SOCSitDown mes)
handle the "someone is sitting down" message |
protected void |
handleSTARTGAME(SOCStartGame mes)
handle the "start game" message |
protected void |
handleTURN(SOCTurn mes)
handle the "turn" message |
protected void |
handleUPDATEROBOTPARAMS(SOCUpdateRobotParams mes)
handle the update robot params message |
void |
init()
Initialize the robot player |
void |
leaveGame(SOCGame ga)
the user leaves the given game |
static void |
main(java.lang.String[] args)
for stand-alones |
void |
treat(SOCMessage mes)
Treat the incoming messages |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CURRENT_PLANS
public static final java.lang.String CURRENT_RESOURCES
protected int gamesPlayed
protected int gamesFinished
protected int gamesWon
protected int cleanBrainKills
protected long startTime
Constructor Detail |
public SOCRobotClient(java.lang.String h, int p, java.lang.String nn, java.lang.String pw)
h
- hostp
- portnn
- nickname for robotpw
- password for robotMethod Detail |
public void init()
public void disconnectReconnect()
public void treat(SOCMessage mes)
treat
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleSERVERPING(SOCServerPing mes)
mes
- the messageprotected void handleADMINPING(SOCAdminPing mes)
mes
- the messageprotected void handleADMINRESET(SOCAdminReset mes)
mes
- the messageprotected void handleUPDATEROBOTPARAMS(SOCUpdateRobotParams mes)
mes
- the messageprotected void handleJOINGAMEREQUEST(SOCJoinGameRequest mes)
mes
- the messageprotected void handleJOINGAMEAUTH(SOCJoinGameAuth mes)
handleJOINGAMEAUTH
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleJOINGAME(SOCJoinGame mes)
handleJOINGAME
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleLEAVEGAME(SOCLeaveGame mes)
handleLEAVEGAME
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleGAMEMEMBERS(SOCGameMembers mes)
handleGAMEMEMBERS
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleGAMETEXTMSG(SOCGameTextMsg mes)
handleGAMETEXTMSG
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleSITDOWN(SOCSitDown mes)
handleSITDOWN
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleBOARDLAYOUT(SOCBoardLayout mes)
handleBOARDLAYOUT
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleSTARTGAME(SOCStartGame mes)
handleSTARTGAME
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleDELETEGAME(SOCDeleteGame mes)
handleDELETEGAME
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleGAMESTATE(SOCGameState mes)
handleGAMESTATE
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleSETTURN(SOCSetTurn mes)
handleSETTURN
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleFIRSTPLAYER(SOCFirstPlayer mes)
handleFIRSTPLAYER
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleTURN(SOCTurn mes)
handleTURN
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handlePLAYERELEMENT(SOCPlayerElement mes)
handlePLAYERELEMENT
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleRESOURCECOUNT(SOCResourceCount mes)
handleRESOURCECOUNT
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleDICERESULT(SOCDiceResult mes)
handleDICERESULT
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handlePUTPIECE(SOCPutPiece mes)
handlePUTPIECE
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleMOVEROBBER(SOCMoveRobber mes)
handleMOVEROBBER
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleDISCARDREQUEST(SOCDiscardRequest mes)
handleDISCARDREQUEST
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleCHOOSEPLAYERREQUEST(SOCChoosePlayerRequest mes)
handleCHOOSEPLAYERREQUEST
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleMAKEOFFER(SOCMakeOffer mes)
handleMAKEOFFER
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleCLEAROFFER(SOCClearOffer mes)
handleCLEAROFFER
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleREJECTOFFER(SOCRejectOffer mes)
handleREJECTOFFER
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleACCEPTOFFER(SOCAcceptOffer mes)
mes
- the messageprotected void handleCLEARTRADEMSG(SOCClearTradeMsg mes)
handleCLEARTRADEMSG
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleDEVCARDCOUNT(SOCDevCardCount mes)
handleDEVCARDCOUNT
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleDEVCARD(SOCDevCard mes)
handleDEVCARD
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleSETPLAYEDDEVCARD(SOCSetPlayedDevCard mes)
handleSETPLAYEDDEVCARD
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleROBOTDISMISS(SOCRobotDismiss mes)
mes
- the messageprotected void handlePOTENTIALSETTLEMENTS(SOCPotentialSettlements mes)
handlePOTENTIALSETTLEMENTS
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleCHANGEFACE(SOCChangeFace mes)
handleCHANGEFACE
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleLONGESTROAD(SOCLongestRoad mes)
handleLONGESTROAD
in class SOCDisplaylessPlayerClient
mes
- the messageprotected void handleLARGESTARMY(SOCLargestArmy mes)
handleLARGESTARMY
in class SOCDisplaylessPlayerClient
mes
- the messagepublic void leaveGame(SOCGame ga)
leaveGame
in class SOCDisplaylessPlayerClient
ga
- the gamepublic void addCleanKill()
public void destroy()
destroy
in class SOCDisplaylessPlayerClient
public static void main(java.lang.String[] args)
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |