|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectGlomus.Server.Player
Glomus.Server.ServerPlayer
public class ServerPlayer
The Player Class is used within the Server to keep track of AI players. The Player class has cards, a location, and a character that it is playing as. The Game class uses the Player to determine if an illegal move has been made, and to communicate with the actual AI Player
Protocol| Constructor Summary | |
|---|---|
ServerPlayer()
Construct an unitialized ServerPlayer (must still be initialized via the initialize method before it can be used) |
|
| Method Summary | |
|---|---|
java.lang.String |
accuse()
Asks the ServerPlayer to make an accusation (ServerPlayers will always decline to make an accusation) |
void |
deletePlayer()
Closes all I/O streams and sockets for this player. |
void |
forward(java.lang.String message)
Forwards the broadcast message |
java.lang.String |
getAnswer()
Asks the player to tell us all the pieces of the answer that it knows for sure |
java.lang.String |
refute(java.lang.String claim)
Asks the ServerPlayer to refute a claim |
java.lang.String |
suggest()
Asks the ServerPlayer to make a suggestion (which it does randomly) |
| Methods inherited from class Glomus.Server.Player |
|---|
forceMove, getCards, getInit, getLocation, getName, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerPlayer()
| Method Detail |
|---|
public java.lang.String suggest()
suggest in class Playerpublic java.lang.String refute(java.lang.String claim)
refute in class PlayerThe - claim to refute, in the form "[suspect] [weapon] [room] [player]"
public java.lang.String accuse()
accuse in class Player
public java.lang.String getAnswer()
throws IllegalTurnException,
TimeoutException,
NetworkFailureException
getAnswer in class PlayerIllegalTurnException
TimeoutException
NetworkFailureExceptionpublic void forward(java.lang.String message)
forward in class PlayerThe - message to forwardpublic void deletePlayer()
deletePlayer in class Player
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||