|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPlayer
LocalPlayer
public class LocalPlayer
This class inherits from the player. This class identifies that the local player is the second player in the game.
| Field Summary |
|---|
| Fields inherited from class Player |
|---|
LOCALPLAYER, NETWORKPLAYER |
| Constructor Summary | |
|---|---|
LocalPlayer(int num,
Rules rules,
Driver theDriver)
This is a default constructor for this object |
|
| Method Summary | |
|---|---|
void |
acceptDraw(Player player)
When the current player accepts a draw, this method is called in the opposite player to inform them that the draw has been accepted. |
void |
endInDeclineDraw(Player player)
Method is invoked if the other player declines a draw. |
void |
endInDraw(Player player)
Method that is invoked when the end of game conditions have been met. |
void |
endOfGame(java.lang.String endMessage)
Method that is invoked when the end of game conditions have been met. |
void |
offerDraw(Player player)
When the current player clicks the draw button, this method is called in the opposite player to inform them that a draw has been offered. |
| Methods inherited from class Player |
|---|
getColor, getName, getNumber, getType, makeMove, setColor, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocalPlayer(int num,
Rules rules,
Driver theDriver)
| Method Detail |
|---|
public void offerDraw(Player player)
offerDraw in class Playerpublic void acceptDraw(Player player)
acceptDraw in class Playerpublic void endInDeclineDraw(Player player)
endInDeclineDraw in class Playerpublic void endOfGame(java.lang.String endMessage)
endOfGame in class PlayerendMessage - Message indicating the end of the game.public void endInDraw(Player player)
endInDraw in class PlayerendMessage - Message indicating the end of the game.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||