Added NetworkGameControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@503 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
e79295f271
commit
f3f8ffe462
22 changed files with 227 additions and 83 deletions
|
@ -96,13 +96,15 @@ public interface IRoundState extends Serializable {
|
|||
*/
|
||||
public void setActivePlayerNumber(int i);
|
||||
|
||||
public GameState getGameState();
|
||||
|
||||
/**
|
||||
* Gets the number of the current turn. Numbers smaller than one indicate hand
|
||||
* inspection turns
|
||||
*
|
||||
* @return current turn number
|
||||
*/
|
||||
public abstract int getTurnNumber();
|
||||
public int getTurnNumber();
|
||||
|
||||
/**
|
||||
* Increments the turn number
|
||||
|
|
|
@ -7,6 +7,7 @@ public class RoundState implements IRoundState {
|
|||
private static final long serialVersionUID = 8678490099871939059L;
|
||||
|
||||
private GameSettings gameSettings;
|
||||
private GameState gameState;
|
||||
|
||||
private ITable table;
|
||||
private ArrayList<Player> players;
|
||||
|
@ -21,8 +22,9 @@ public class RoundState implements IRoundState {
|
|||
* @param gameSettings
|
||||
* the game settings
|
||||
*/
|
||||
public RoundState(GameSettings gameSettings) {
|
||||
public RoundState(GameSettings gameSettings, GameState gameState) {
|
||||
this.gameSettings = gameSettings;
|
||||
this.gameState = gameState;
|
||||
|
||||
table = new Table(gameSettings);
|
||||
players = new ArrayList<Player>();
|
||||
|
@ -118,4 +120,9 @@ public class RoundState implements IRoundState {
|
|||
public void nextTurn() {
|
||||
turnNumber++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameState getGameState() {
|
||||
return gameState;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue