Cleaned up RoundControl tests

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@260 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-24 01:51:49 +02:00
parent 102299d0ff
commit 2446671f7a
10 changed files with 45 additions and 105 deletions

View file

@ -6,7 +6,7 @@ import java.util.List;
/**
* The overall game settings
*/
public class GameSettings implements IGameSettings {
public class GameSettings {
private List<PlayerSettings> players = new ArrayList<PlayerSettings>();
private int initialMeldThreshold;
@ -18,26 +18,30 @@ public class GameSettings implements IGameSettings {
initialMeldThreshold = 30;
}
/* (non-Javadoc)
* @see jrummikub.model.IGameSettings#getPlayerList()
/**
* Returns the list containing the settings of all players
*
* @return the player settings list
*/
@Override
public List<PlayerSettings> getPlayerList() {
return players;
}
/* (non-Javadoc)
* @see jrummikub.model.IGameSettings#setInitialMeldThreshold(int)
/**
* Sets the initial meld threshold
*
* @param value
* the value to set
*/
@Override
public void setInitialMeldThreshold(int value) {
initialMeldThreshold = value;
}
/* (non-Javadoc)
* @see jrummikub.model.IGameSettings#getInitialMeldThreshold()
/**
* Returns the initial meld threshold
*
* @return the threshold
*/
@Override
public int getInitialMeldThreshold() {
return initialMeldThreshold;
}

View file

@ -1,29 +0,0 @@
package jrummikub.model;
import java.util.List;
public interface IGameSettings {
/**
* Returns the list containing the settings of all players
*
* @return the player settings list
*/
public List<PlayerSettings> getPlayerList();
/**
* Sets the initial meld threshold
*
* @param value
* the value to set
*/
public void setInitialMeldThreshold(int value);
/**
* Returns the initial meld threshold
*
* @return the threshold
*/
public int getInitialMeldThreshold();
}

View file

@ -10,7 +10,7 @@ public interface IRoundState {
*
* @return The game settings
*/
public IGameSettings getGameSettings();
public GameSettings getGameSettings();
/**
* Get the current {@link Table}

View file

@ -5,7 +5,7 @@ import java.util.List;
/** Class managing the overall and momentary RoundState */
public class RoundState implements IRoundState {
private IGameSettings gameSettings;
private GameSettings gameSettings;
private ITable table;
private List<Player> players;
@ -18,7 +18,7 @@ public class RoundState implements IRoundState {
* @param gameSettings
* the game settings
*/
public RoundState(IGameSettings gameSettings) {
public RoundState(GameSettings gameSettings) {
this.gameSettings = gameSettings;
table = new Table();
@ -68,7 +68,7 @@ public class RoundState implements IRoundState {
}
@Override
public IGameSettings getGameSettings() {
public GameSettings getGameSettings() {
return gameSettings;
}
}