Added Javadoc
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@593 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
73c1072ba6
commit
e9b2de87bc
4 changed files with 86 additions and 3 deletions
|
@ -382,6 +382,11 @@ public class NetworkControl {
|
||||||
gameControl.startGame();
|
gameControl.startGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if there is a running game
|
||||||
|
*
|
||||||
|
* @return is there a game running
|
||||||
|
*/
|
||||||
public boolean isGameRunning() {
|
public boolean isGameRunning() {
|
||||||
return gameControl != null;
|
return gameControl != null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,12 @@ public class NetworkGameControl extends GameControl {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The back event is emitted when the network game has ended and the player
|
||||||
|
* wants to return to the game list
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
public IEvent getBackEvent() {
|
public IEvent getBackEvent() {
|
||||||
return backEvent;
|
return backEvent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package jrummikub.control.network;
|
package jrummikub.control.network;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import jrummikub.control.RoundControl;
|
import jrummikub.control.RoundControl;
|
||||||
import jrummikub.control.turn.ITurnControl;
|
import jrummikub.control.turn.ITurnControl;
|
||||||
import jrummikub.model.IRoundState;
|
import jrummikub.model.IRoundState;
|
||||||
|
|
|
@ -61,8 +61,20 @@ public interface IView {
|
||||||
*/
|
*/
|
||||||
public void setCurrentPlayerName(String playerName);
|
public void setCurrentPlayerName(String playerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the name of the player that has redealt last
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* the player name
|
||||||
|
*/
|
||||||
public void setRedealedPlayerName(String name);
|
public void setRedealedPlayerName(String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the name of the player that has drawn the last stone
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* the player name
|
||||||
|
*/
|
||||||
public void setLastStonePlayerName(String name);
|
public void setLastStonePlayerName(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,6 +100,12 @@ public interface IView {
|
||||||
*/
|
*/
|
||||||
public IEvent getAcknowledgeInvalidEvent();
|
public IEvent getAcknowledgeInvalidEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The acknoledge connection lost event is emitted when the user has
|
||||||
|
* acknowledged that the network connection was lost
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
public IEvent getAcknowledgeConnectionLostEvent();
|
public IEvent getAcknowledgeConnectionLostEvent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -369,6 +387,62 @@ public interface IView {
|
||||||
* Different types of bottom panels
|
* Different types of bottom panels
|
||||||
*/
|
*/
|
||||||
public enum BottomPanelType {
|
public enum BottomPanelType {
|
||||||
START_GAME_PANEL, START_TURN_PANEL, START_REDEAL_TURN_PANEL, START_LAST_TURN_PANEL, INVALID_TURN_PANEL, HUMAN_HAND_PANEL, NONHUMAN_HAND_PANEL, WIN_PANEL, NETWORK_WIN_PANEL, NETWORK_CONNECTION_LOST_PANEL, NETWORK_SERVER_CONNECTION_LOST_PANEL
|
/**
|
||||||
|
* The start game panel is displayed at the start of the program and
|
||||||
|
* contains some Bling
|
||||||
|
*/
|
||||||
|
START_GAME_PANEL,
|
||||||
|
/**
|
||||||
|
* The start turn panel is used to separate the players' turns from each
|
||||||
|
* other in hotseat mode
|
||||||
|
*/
|
||||||
|
START_TURN_PANEL,
|
||||||
|
/**
|
||||||
|
* The start redeal turn panel is displayed at the beginning of the players'
|
||||||
|
* turns after a player has redealt
|
||||||
|
*/
|
||||||
|
START_REDEAL_TURN_PANEL,
|
||||||
|
/**
|
||||||
|
* The start redeal turn panel is displayed at the beginning of the players'
|
||||||
|
* turns after a player has drawn the last stone
|
||||||
|
*/
|
||||||
|
START_LAST_TURN_PANEL,
|
||||||
|
/**
|
||||||
|
* The invalid turn panel is displayed when a player is shown what invalid
|
||||||
|
* sets he has layed out
|
||||||
|
*/
|
||||||
|
INVALID_TURN_PANEL,
|
||||||
|
/**
|
||||||
|
* The human hand panel shows a human player's stones
|
||||||
|
* */
|
||||||
|
HUMAN_HAND_PANEL,
|
||||||
|
/**
|
||||||
|
* The non-human hand panel looks like a human hand panel, but it is
|
||||||
|
* darkened and no stones are displayed
|
||||||
|
*/
|
||||||
|
NONHUMAN_HAND_PANEL,
|
||||||
|
/**
|
||||||
|
* The win panel is displayed when a player has won the game and can choose
|
||||||
|
* between starting a new round, going back to the game setup or quitting
|
||||||
|
* the program
|
||||||
|
**/
|
||||||
|
WIN_PANEL,
|
||||||
|
/**
|
||||||
|
* The win panel is displayed to a non-host network user when a player has
|
||||||
|
* won the game. He can choose between waiting for the host to start a new
|
||||||
|
* round or ending the game by going back to the game list or quitting the
|
||||||
|
* program
|
||||||
|
**/
|
||||||
|
NETWORK_WIN_PANEL,
|
||||||
|
/**
|
||||||
|
* The network connection lost panel is displayed when a user that was
|
||||||
|
* participating in the current game has disappeared
|
||||||
|
**/
|
||||||
|
NETWORK_CONNECTION_LOST_PANEL,
|
||||||
|
/**
|
||||||
|
* The network server connection lost panel is displayed when the connection
|
||||||
|
* to the XMPP server is lost
|
||||||
|
**/
|
||||||
|
NETWORK_SERVER_CONNECTION_LOST_PANEL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue