|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.redfelineninja.risk.client.RiskClient
This class provide a means to the start the client. In addition to bootstrapping the client this class aslo provides communication functions. This class as called by the network sub-system to perform all actions on the client. In addition it provides ActionListeners to communicate user actions to the server.
Status: ActionListeners are not yet implemented.
Constructor Summary | |
RiskClient()
Start the application version of the Risk client. |
Method Summary | |
void |
gameOver(Player player)
Called when the game is won. |
void |
gameOver(Player player,
java.lang.String reason)
Called when the game is stopped by the server. |
void |
gameStarting(Player[] players)
|
RiskCardFrame |
getCardFrame()
|
RiskClientFrame |
getMainFrame()
|
RiskServerInterface |
getServer()
|
RiskTalkerFrame |
getTalkerFrame()
|
RiskWaitingFrame |
getWaitingFrame()
|
void |
lostPlayer(Player player)
Player loss is handled purely at the server. |
static void |
main(java.lang.String[] args)
Starting point for the application version. |
void |
message(java.lang.String message)
Message sent over the chat system to all clients. |
void |
message(java.lang.String message,
Player player)
|
void |
newGame(Player[] players)
Called when the games owner decides to stop waiting for new players and start playing. |
void |
newPlayer(Player player)
Called when a new player has joined the game the client is waiting to play |
void |
newSpectator(Player player)
Spectator interaction is not yet supported. |
void |
select(java.lang.String country)
Select the supplied country. |
void |
setArmies(java.lang.String country,
int a)
Set the number of armies in a country. |
void |
setCards(Card[] cards)
Tell the client the cards that the player has. |
void |
setDice(int[] die)
Die displays are not yet implemented in this interface. |
void |
setOwner(java.lang.String country,
Player player)
Set the owner of the country to the player. |
void |
setTurn(Player player)
Moves the turn bar so that the supplied player is at the top |
void |
showStatus(java.lang.String status)
Display the supplied string in the clients status line. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RiskClient()
Method Detail |
public static void main(java.lang.String[] args)
public RiskClientFrame getMainFrame()
public RiskWaitingFrame getWaitingFrame()
public RiskTalkerFrame getTalkerFrame()
public RiskCardFrame getCardFrame()
public RiskServerInterface getServer()
public void gameStarting(Player[] players)
public void newPlayer(Player player)
RiskClientInterface
newPlayer
in interface RiskClientInterface
public void newSpectator(Player player)
newSpectator
in interface RiskClientInterface
public void lostPlayer(Player player)
lostPlayer
in interface RiskClientInterface
public void newGame(Player[] players)
RiskClientInterface
newGame
in interface RiskClientInterface
public void gameOver(Player player)
RiskClientInterface
gameOver
in interface RiskClientInterface
public void gameOver(Player player, java.lang.String reason)
RiskClientInterface
gameOver
in interface RiskClientInterface
public void message(java.lang.String message)
RiskClientInterface
message
in interface RiskClientInterface
public void message(java.lang.String message, Player player)
public void setTurn(Player player)
setTurn
in interface RiskClientInterface
public void setArmies(java.lang.String country, int a)
RiskClientInterface
setArmies
in interface RiskClientInterface
public void setOwner(java.lang.String country, Player player)
RiskClientInterface
setOwner
in interface RiskClientInterface
public void select(java.lang.String country)
RiskClientInterface
select
in interface RiskClientInterface
public void showStatus(java.lang.String status)
RiskClientInterface
showStatus
in interface RiskClientInterface
public void setDice(int[] die)
setDice
in interface RiskClientInterface
public void setCards(Card[] cards)
RiskClientInterface
setCards
in interface RiskClientInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |