Add some endOfTurn handling to RoundControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@155 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
0b66e7d763
commit
38f6f0dc24
6 changed files with 254 additions and 219 deletions
|
@ -27,6 +27,11 @@ public class GameState implements IGameState {
|
|||
return table;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTable(ITable table) {
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlayerCount() {
|
||||
return players.size();
|
||||
|
|
|
@ -3,6 +3,7 @@ package jrummikub.model;
|
|||
public interface IGameState {
|
||||
|
||||
public ITable getTable();
|
||||
public void setTable(ITable table);
|
||||
|
||||
public int getPlayerCount();
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package jrummikub.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -42,7 +43,7 @@ public class StoneHeap {
|
|||
* Removes several {@link Stone}s from the heap and returns them
|
||||
*
|
||||
* @param number
|
||||
* number of requested Stones
|
||||
* number of requested Stones
|
||||
* @return list of drawn stones
|
||||
*/
|
||||
public List<Stone> drawStones(int number) {
|
||||
|
@ -56,4 +57,8 @@ public class StoneHeap {
|
|||
public int getSize() {
|
||||
return heap.size();
|
||||
}
|
||||
|
||||
public void putBack(Collection<Stone> stones) {
|
||||
heap.addAll(stones);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue