getPlayer entfernt, weil es getNthNextPlayer gibt. Warnings beseitigt.

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@170 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-05-08 18:10:07 +02:00
parent 8ee379b1ab
commit 82c58a1eae
6 changed files with 32 additions and 30 deletions

View file

@ -66,7 +66,7 @@ public class RoundControl {
void deal() {
for (int i = 0; i < gameState.getPlayerCount(); i++) {
IHand hand = gameState.getPlayer(i).getHand();
IHand hand = gameState.getNthNextPlayer(i).getHand();
for (int j = 0; j < 7; j++) {
hand.drop(gameState.getGameHeap().drawStone(), new Position(j, 0));
hand.drop(gameState.getGameHeap().drawStone(), new Position(j, 1));
@ -81,8 +81,6 @@ public class RoundControl {
if (clonedTable.isValid()) {
gameState.setTable(clonedTable);
System.err.println(gameState.getActivePlayer().getName());
System.err.println(gameState.getActivePlayer().getHand().getSize());
if (gameState.getActivePlayer().getHand().getSize() == 0) {
win();
return;

View file

@ -37,11 +37,6 @@ public class GameState implements IGameState {
return players.size();
}
@Override
public IPlayer getPlayer(int i) {
return players.get(i);
}
/** Changes the activePlayer to the next {@link Player} in the list */
@Override
public void nextPlayer() {

View file

@ -3,12 +3,11 @@ package jrummikub.model;
public interface IGameState {
public ITable getTable();
public void setTable(ITable table);
public int getPlayerCount();
public IPlayer getPlayer(int i);
/** Changes the activePlayer to the next {@link Player} in the list */
public void nextPlayer();