Fixed a few warnings

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@320 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-05-30 10:13:26 +02:00
parent b19a46b7b2
commit 7404566d46
6 changed files with 29 additions and 30 deletions

View file

@ -1,13 +1,7 @@
package jrummikub.control.turn; package jrummikub.control.turn;
import java.util.Date;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import jrummikub.model.IHand;
import jrummikub.model.ITable;
import jrummikub.view.IView;
public class BaseAIControl extends AbstractTurnControl { public class BaseAIControl extends AbstractTurnControl {
long startTime; long startTime;

View file

@ -9,8 +9,6 @@ import java.util.List;
import jrummikub.control.ITurnTimer; import jrummikub.control.ITurnTimer;
import jrummikub.control.TurnTimer; import jrummikub.control.TurnTimer;
import jrummikub.model.Hand; import jrummikub.model.Hand;
import jrummikub.model.IHand;
import jrummikub.model.ITable;
import jrummikub.model.Position; import jrummikub.model.Position;
import jrummikub.model.Stone; import jrummikub.model.Stone;
import jrummikub.model.StoneColor; import jrummikub.model.StoneColor;
@ -20,7 +18,6 @@ import jrummikub.util.IListener;
import jrummikub.util.IListener1; import jrummikub.util.IListener1;
import jrummikub.util.IListener2; import jrummikub.util.IListener2;
import jrummikub.util.Pair; import jrummikub.util.Pair;
import jrummikub.view.IView;
/** /**
* Controller for a single turn made by a human player * Controller for a single turn made by a human player

View file

@ -1,6 +1,5 @@
package jrummikub.control.turn; package jrummikub.control.turn;
import jrummikub.model.IHand;
import jrummikub.model.IPlayer; import jrummikub.model.IPlayer;
import jrummikub.model.ITable; import jrummikub.model.ITable;
import jrummikub.util.Event; import jrummikub.util.Event;

View file

@ -1,9 +1,10 @@
package jrummikub.control.turn; package jrummikub.control.turn;
import jrummikub.model.IHand; /**
import jrummikub.model.ITable; * Creates a turn control for the active player, regarding if layer is human or
import jrummikub.view.IView; * computer
*
*/
public abstract class TurnControlFactory { public abstract class TurnControlFactory {
/** /**
* Type of turn control. * Type of turn control.
@ -18,7 +19,7 @@ public abstract class TurnControlFactory {
public abstract ITurnControl create(); public abstract ITurnControl create();
static public TurnControlFactory getFactory(Type type) { static public TurnControlFactory getFactory(Type type) {
switch(type) { switch (type) {
case HUMAN: case HUMAN:
return HumanTurnControl.getFactory(); return HumanTurnControl.getFactory();
case COMPUTER: case COMPUTER:

View file

@ -3,7 +3,6 @@ package jrummikub.view;
import java.awt.Color; import java.awt.Color;
import jrummikub.control.turn.TurnControlFactory; import jrummikub.control.turn.TurnControlFactory;
import jrummikub.control.turn.TurnControlFactory.Type;
import jrummikub.model.GameSettings; import jrummikub.model.GameSettings;
import jrummikub.util.IEvent; import jrummikub.util.IEvent;
import jrummikub.util.IEvent1; import jrummikub.util.IEvent1;

View file

@ -47,7 +47,7 @@ public interface IView {
* Sets the current player's name * Sets the current player's name
* *
* @param playerName * @param playerName
* the player name * the player name
*/ */
public void setCurrentPlayerName(String playerName); public void setCurrentPlayerName(String playerName);
@ -55,7 +55,7 @@ public interface IView {
* Sets the stones that are to be painted selected * Sets the stones that are to be painted selected
* *
* @param stones * @param stones
* the stones to be painted selected * the stones to be painted selected
*/ */
public void setSelectedStones(Collection<Stone> stones); public void setSelectedStones(Collection<Stone> stones);
@ -63,7 +63,7 @@ public interface IView {
* Enables or disables the player's StartTurnPanel * Enables or disables the player's StartTurnPanel
* *
* @param enable * @param enable
* enable/disable * enable/disable
*/ */
public void enableStartTurnPanel(boolean enable); public void enableStartTurnPanel(boolean enable);
@ -78,7 +78,7 @@ public interface IView {
* Enables or disables the panel shown when a player has won * Enables or disables the panel shown when a player has won
* *
* @param enable * @param enable
* enable/disable * enable/disable
*/ */
public void enableWinPanel(boolean enable); public void enableWinPanel(boolean enable);
@ -100,7 +100,7 @@ public interface IView {
* Shows or hides the game settings panel * Shows or hides the game settings panel
* *
* @param show * @param show
* specifies if the panel shall be shown or hidden * specifies if the panel shall be shown or hidden
*/ */
public void showSettingsPanel(boolean show); public void showSettingsPanel(boolean show);
@ -108,7 +108,7 @@ public interface IView {
* Shows or hides the score panel * Shows or hides the score panel
* *
* @param show * @param show
* specifies if the panel shall be shown or hidden * specifies if the panel shall be shown or hidden
*/ */
public void showScorePanel(boolean show); public void showScorePanel(boolean show);
@ -116,15 +116,17 @@ public interface IView {
* Is used for the PlayerPanel and ScorePanel to display a player's color * Is used for the PlayerPanel and ScorePanel to display a player's color
* along with the name * along with the name
* *
* @param color the current player's color * @param color
* the current player's color
*/ */
public void setCurrentPlayerColor(Color color); public void setCurrentPlayerColor(Color color);
/** /**
* Is used for the PlayerPanel to display if a player has laid out along with * Is used for the PlayerPanel to display if a player has laid out along
* the name * with the name
* *
* @param hasLaidOut specifies if the current player has laid out or not * @param hasLaidOut
* specifies if the current player has laid out or not
*/ */
public void setHasLaidOut(boolean hasLaidOut); public void setHasLaidOut(boolean hasLaidOut);
@ -139,9 +141,16 @@ public interface IView {
* Enables or disables most parts of the interface * Enables or disables most parts of the interface
* *
* @param enable * @param enable
* specifies if the interface is to be enabled or disabled * specifies if the interface is to be enabled or disabled
*/ */
void showInterface(boolean enable); void showInterface(boolean enable);
/**
* Enables or disables the panel shown while the computer player is making a
* move
*
* @param b
* specifies if the interface is enabled or disabled
*/
public void enableThinkPanel(boolean b); public void enableThinkPanel(boolean b);
} }