diff options
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r-- | src/jrummikub/control/TurnControl.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/jrummikub/control/TurnControl.java b/src/jrummikub/control/TurnControl.java index d280096..afe1f9a 100644 --- a/src/jrummikub/control/TurnControl.java +++ b/src/jrummikub/control/TurnControl.java @@ -36,15 +36,15 @@ public class TurnControl { private List<Connection> connections = new ArrayList<Connection>(); /** - * Create a new TurnControl using a given hand (of the active player), a - * given table and a given view for user interaction. + * Create a new TurnControl using a given hand (of the active player), a given + * table and a given view for user interaction. * * @param hand - * active player's hand + * active player's hand * @param table - * current table + * current table * @param view - * view for user interaction. + * view for user interaction. */ public TurnControl(IHand hand, ITable table, IView view) { this.hand = hand; @@ -247,9 +247,8 @@ public class TurnControl { y++; if (y >= GameControl.HAND_HEIGHT) { - throw new ArrayIndexOutOfBoundsException(); // TODO We can't - // handle - // this yet... + // TODO We can't handle this yet... + throw new ArrayIndexOutOfBoundsException(); } } } @@ -329,14 +328,14 @@ public class TurnControl { private void tableRangeClick(Stone stone, Boolean collect) { if (selectedStones.isEmpty()) { - stoneClick(stone, collect); + stoneClick(stone, true); return; } Stone lastStone = selectedStones.get(selectedStones.size() - 1); StoneSet lastSet = table.findStoneSet(lastStone); StoneSet selectedSet = table.findStoneSet(stone); if (lastSet != selectedSet) { - stoneClick(stone, collect); + stoneClick(stone, true); return; } List<Stone> setStones = new ArrayList<Stone>(); @@ -361,13 +360,13 @@ public class TurnControl { private void handRangeClick(Stone stone, Boolean collect) { if (selectedStones.isEmpty()) { - stoneClick(stone, collect); + stoneClick(stone, true); return; } Stone lastStone = selectedStones.get(selectedStones.size() - 1); StoneSet lastSet = table.findStoneSet(lastStone); if (lastSet != null) { - stoneClick(stone, collect); + stoneClick(stone, true); return; } List<Pair<Stone, Position>> handPairs = new ArrayList<Pair<Stone, Position>>(); |