From e9b2de87bca4e0ba34236455e2c25c9f17be26d3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 22 Jun 2011 10:51:16 +0200 Subject: Added Javadoc git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@593 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/network/NetworkControl.java | 5 ++ .../control/network/NetworkGameControl.java | 6 ++ .../control/network/NetworkRoundControl.java | 2 - src/jrummikub/view/IView.java | 76 +++++++++++++++++++++- 4 files changed, 86 insertions(+), 3 deletions(-) (limited to 'src/jrummikub') diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index d31442b..bf92ab5 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -382,6 +382,11 @@ public class NetworkControl { gameControl.startGame(); } + /** + * Returns if there is a running game + * + * @return is there a game running + */ public boolean isGameRunning() { return gameControl != null; } diff --git a/src/jrummikub/control/network/NetworkGameControl.java b/src/jrummikub/control/network/NetworkGameControl.java index 009c131..a277cd3 100644 --- a/src/jrummikub/control/network/NetworkGameControl.java +++ b/src/jrummikub/control/network/NetworkGameControl.java @@ -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() { return backEvent; } diff --git a/src/jrummikub/control/network/NetworkRoundControl.java b/src/jrummikub/control/network/NetworkRoundControl.java index c8731ee..29ec397 100644 --- a/src/jrummikub/control/network/NetworkRoundControl.java +++ b/src/jrummikub/control/network/NetworkRoundControl.java @@ -1,7 +1,5 @@ package jrummikub.control.network; -import java.util.Date; - import jrummikub.control.RoundControl; import jrummikub.control.turn.ITurnControl; import jrummikub.model.IRoundState; diff --git a/src/jrummikub/view/IView.java b/src/jrummikub/view/IView.java index 72c3808..c86b8ac 100644 --- a/src/jrummikub/view/IView.java +++ b/src/jrummikub/view/IView.java @@ -61,8 +61,20 @@ public interface IView { */ 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); + /** + * Sets the name of the player that has drawn the last stone + * + * @param name + * the player name + */ public void setLastStonePlayerName(String name); /** @@ -88,6 +100,12 @@ public interface IView { */ 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(); /** @@ -369,6 +387,62 @@ public interface IView { * Different types of bottom panels */ 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 } } -- cgit v1.2.3