|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.bluebones.boggle.Player
net.bluebones.boggle.AIPlayer
public class AIPlayer
Computer opponent.
| Constructor Summary | |
|---|---|
AIPlayer(Player parentPlayer)
Initializes an AIPlayer that can find words of any length. |
|
AIPlayer(Player parentPlayer,
int rating)
Initializes an AIPlayer with the specified rating. |
|
| Method Summary | |
|---|---|
void |
addWord(String word)
Adds word to the list of words this AI has found. |
static AIPlayer[] |
getAIPlayers(Player parentPlayer)
Creates a group of AI players to use as standard. |
IServer |
getLocalServer()
Returns null as AI does not use a local server. |
String[] |
getWords()
Gets the words this AI has found. |
void |
hostGame()
Does nothing (interface requirement). |
void |
info(String msg)
Relays the specified message to the owner of this AIPlayer. |
void |
init(char[][] letters,
int timeInSecs)
Does nothing (interface requirement). |
void |
problem(String msg)
Notifies the owner of this AIPlayer of the specified
problem. |
void |
results(Round round)
Does nothing (interface requirement). |
void |
setBoard(char[][] letters)
Does nothing (interface requirement). |
void |
setConnection(ConnectionType type,
String addr,
int clients)
Does nothing (interface requirement). |
void |
setConnection(ConnectionType type,
String addr,
int clients,
int dots)
Does nothing (interface requirement). |
void |
setLocalServer(Server server)
Does nothing (interface requirement). |
void |
setRubber(Rubber r)
Does nothing (interface requirement). |
void |
setTimer(int amount)
Does nothing (interface requirement). |
void |
startLocalGame(char[][] letters,
int time)
Starts a local game. |
void |
startNetworkGame()
Does nothing (interface requirement). |
void |
stopGame()
Stops this AI finding words. |
String |
toString()
Gets a String representation of this AI. |
| Methods inherited from class net.bluebones.boggle.Player |
|---|
connecting, connectingTo, createRegistry, endGame, getClient, getClients, getGame, getHostInfo, getPort, getRegistry, getRemoteServer, hostConnectionLost, joinGame, setClient, setConnecting, setGame, setHostInfo, setNotConnecting, setRegistry, setRemoteServer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AIPlayer(Player parentPlayer)
AIPlayer that can find words of any length.
parentPlayer - The "owner" of this AIPlayer.
public AIPlayer(Player parentPlayer,
int rating)
AIPlayer with the specified rating.
parentPlayer - The "owner" of this AIPlayer.rating - The relative strenght of this
AIPlayer.| Method Detail |
|---|
public void info(String msg)
AIPlayer.
info in class Playermsg - Message to relay.public void problem(String msg)
AIPlayer of the specified
problem.
problem in class Playermsg - Message to relay.public void startNetworkGame()
public void startLocalGame(char[][] letters,
int time)
startLocalGame in class Playerletters - Letters to initialize the board with.time - Duration of game in seconds.public void addWord(String word)
word to the list of words this AI has found.
word - String word to add.public String[] getWords()
getWords in class PlayerString[] of all words the AI has found this turn.public void stopGame()
stopGame in class Playerpublic void hostGame()
public void setBoard(char[][] letters)
public void setTimer(int amount)
setTimer in class Playeramount - Amount to set the display to in tenths of
a second.
public void init(char[][] letters,
int timeInSecs)
init in class Playerletters - char[][] of letters on the board.timeInSecs - int time of the round in seconds.public void setRubber(Rubber r)
setRubber in class Playerr - Rubber details to deal with.
public void setConnection(ConnectionType type,
String addr,
int clients)
setConnection in class Playertype - ConnectionType type of connection.addr - String address connected to.clients - int number of clients attached to this
Player.
public void setConnection(ConnectionType type,
String addr,
int clients,
int dots)
setConnection in class Playertype - ConnectionType type of connection.addr - String address connected to.clients - int number of clients attached to this
Player.dots - int number of dots to be displayed by the
client at this time. Maximum of three.public void setLocalServer(Server server)
setLocalServer in class Playerserver - Server to set as local server or null to
unset.
IllegalArgumentException - If called with non-null
server.public IServer getLocalServer()
getLocalServer in class Playernull.public void results(Round round)
results in class Playerround - Round result details.public static AIPlayer[] getAIPlayers(Player parentPlayer)
parentPlayer - The "owner" of these AIs.
AIPlayer[] of AIs.public String toString()
String representation of this AI.
toString in class ObjectString representation.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||