|
|
@ -37,6 +37,7 @@ import org.junit.Test;
|
|
|
|
* Tests for {@link HumanTurnControl}
|
|
|
|
* Tests for {@link HumanTurnControl}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class TurnControlTest {
|
|
|
|
public class TurnControlTest {
|
|
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
|
|
static class AccessibleTable extends Table {
|
|
|
|
static class AccessibleTable extends Table {
|
|
|
|
StoneSet[] getSetArray() {
|
|
|
|
StoneSet[] getSetArray() {
|
|
|
|
return objects.keySet().toArray(new StoneSet[0]);
|
|
|
|
return objects.keySet().toArray(new StoneSet[0]);
|
|
|
@ -75,6 +76,28 @@ public class TurnControlTest {
|
|
|
|
MockTable mockTable;
|
|
|
|
MockTable mockTable;
|
|
|
|
MockHand mockHand;
|
|
|
|
MockHand mockHand;
|
|
|
|
boolean eventFired;
|
|
|
|
boolean eventFired;
|
|
|
|
|
|
|
|
Stone blueOne = new Stone(1, BLUE);
|
|
|
|
|
|
|
|
Stone redOne = new Stone(1, RED);
|
|
|
|
|
|
|
|
Stone blackOne = new Stone(1, BLACK);
|
|
|
|
|
|
|
|
Stone blueTwo = new Stone(2, BLUE);
|
|
|
|
|
|
|
|
Stone blueThree = new Stone(3, BLUE);
|
|
|
|
|
|
|
|
Stone blueFour = new Stone(4, BLUE);
|
|
|
|
|
|
|
|
Stone redTwo = new Stone(2, RED);
|
|
|
|
|
|
|
|
Stone redThree = new Stone(3, RED);
|
|
|
|
|
|
|
|
Stone redFour = new Stone(4, RED);
|
|
|
|
|
|
|
|
Stone blackTwo = new Stone(2, BLACK);
|
|
|
|
|
|
|
|
Stone blackThree = new Stone(3, BLACK);
|
|
|
|
|
|
|
|
Stone blackFour = new Stone(4, BLACK);
|
|
|
|
|
|
|
|
Stone blackFive = new Stone(5, BLACK);
|
|
|
|
|
|
|
|
Stone redJoker = new Stone(RED);
|
|
|
|
|
|
|
|
Stone blackJoker = new Stone(BLACK);
|
|
|
|
|
|
|
|
Stone orange10 = new Stone(10, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone blue4a = new Stone(4, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone black5 = new Stone(5, StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone orange13 = new Stone(13, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone red11 = new Stone(11, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone black10 = new Stone(10, StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone black13 = new Stone(13, StoneColor.BLACK);
|
|
|
|
|
|
|
|
|
|
|
|
private void checkTableDisplay(ITable table) {
|
|
|
|
private void checkTableDisplay(ITable table) {
|
|
|
|
Iterator<Pair<StoneSet, Position>> stoneSetsView = mockView.tablePanel.stoneSets
|
|
|
|
Iterator<Pair<StoneSet, Position>> stoneSetsView = mockView.tablePanel.stoneSets
|
|
|
@ -110,8 +133,8 @@ public class TurnControlTest {
|
|
|
|
mockPlayer = new MockPlayer(null, null);
|
|
|
|
mockPlayer = new MockPlayer(null, null);
|
|
|
|
mockPlayer.hand = mockHand;
|
|
|
|
mockPlayer.hand = mockHand;
|
|
|
|
testControl = new HumanTurnControl(mockTimer);
|
|
|
|
testControl = new HumanTurnControl(mockTimer);
|
|
|
|
testControl.setup(new ITurnControl.TurnInfo(mockTable,
|
|
|
|
testControl.setup(new ITurnControl.TurnInfo(mockTable, mockPlayer
|
|
|
|
mockPlayer.getHand(), mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN),
|
|
|
|
.getHand(), mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN),
|
|
|
|
new GameSettings(), mockView);
|
|
|
|
new GameSettings(), mockView);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -130,14 +153,14 @@ public class TurnControlTest {
|
|
|
|
mockView.bottomPanelType = BottomPanelType.START_TURN_PANEL;
|
|
|
|
mockView.bottomPanelType = BottomPanelType.START_TURN_PANEL;
|
|
|
|
|
|
|
|
|
|
|
|
List<Pair<Stone, Position>> stones = Arrays.asList(
|
|
|
|
List<Pair<Stone, Position>> stones = Arrays.asList(
|
|
|
|
new Pair<Stone, Position>(new Stone(RED), new Position(0, 0)),
|
|
|
|
new Pair<Stone, Position>(redJoker, new Position(0, 0)),
|
|
|
|
new Pair<Stone, Position>(new Stone(BLACK), new Position(1, 0)));
|
|
|
|
new Pair<Stone, Position>(blackJoker, new Position(1, 0)));
|
|
|
|
|
|
|
|
|
|
|
|
mockHand.iterable = stones;
|
|
|
|
mockHand.iterable = stones;
|
|
|
|
|
|
|
|
|
|
|
|
testControl = new HumanTurnControl(mockTimer);
|
|
|
|
testControl = new HumanTurnControl(mockTimer);
|
|
|
|
testControl.setup(new ITurnControl.TurnInfo(mockTable,
|
|
|
|
testControl.setup(new ITurnControl.TurnInfo(mockTable, mockPlayer
|
|
|
|
mockPlayer.getHand(), mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN),
|
|
|
|
.getHand(), mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN),
|
|
|
|
new GameSettings(), mockView);
|
|
|
|
new GameSettings(), mockView);
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
@ -215,19 +238,15 @@ public class TurnControlTest {
|
|
|
|
public void selectStoneInHand() {
|
|
|
|
public void selectStoneInHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, false);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(firstStone));
|
|
|
|
assertCollection(Arrays.asList(redJoker));
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -235,23 +254,20 @@ public class TurnControlTest {
|
|
|
|
public void collectStoneInHand() {
|
|
|
|
public void collectStoneInHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(firstStone));
|
|
|
|
assertCollection(Arrays.asList(redJoker));
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(firstStone, secondStone));
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker));
|
|
|
|
|
|
|
|
|
|
|
|
// De-select first stone
|
|
|
|
// De-select first stone
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -259,16 +275,13 @@ public class TurnControlTest {
|
|
|
|
public void deselectStoneInCollection() {
|
|
|
|
public void deselectStoneInCollection() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(redJoker,
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(firstStone,
|
|
|
|
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -276,16 +289,13 @@ public class TurnControlTest {
|
|
|
|
public void reorderCollection() {
|
|
|
|
public void reorderCollection() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
blackJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(firstStone,
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker));
|
|
|
|
true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone, firstStone));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -293,16 +303,13 @@ public class TurnControlTest {
|
|
|
|
public void deselectWholeCollection() {
|
|
|
|
public void deselectWholeCollection() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(redJoker,
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(firstStone,
|
|
|
|
|
|
|
|
true);
|
|
|
|
true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.setClickEvent.emit(firstStone,
|
|
|
|
mockView.tablePanel.stoneCollectionPanel.setClickEvent.emit(redJoker,
|
|
|
|
true);
|
|
|
|
true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(new ArrayList<Stone>());
|
|
|
|
assertCollection(new ArrayList<Stone>());
|
|
|
@ -313,19 +320,13 @@ public class TurnControlTest {
|
|
|
|
public void selectStoneOnTable() {
|
|
|
|
public void selectStoneOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(firstStone, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, false);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redJoker));
|
|
|
|
assertCollection(Arrays.asList(firstStone));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(blackJoker, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(secondStone, false);
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -333,23 +334,17 @@ public class TurnControlTest {
|
|
|
|
public void collectStoneOnTable() {
|
|
|
|
public void collectStoneOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redJoker));
|
|
|
|
assertCollection(Arrays.asList(firstStone));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker));
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(firstStone, secondStone));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// De-select first stone
|
|
|
|
// De-select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -357,22 +352,18 @@ public class TurnControlTest {
|
|
|
|
public void selectSetOnTable() {
|
|
|
|
public void selectSetOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redJoker, blackJoker));
|
|
|
|
Stone stone2 = new Stone(StoneColor.BLACK);
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(redOne, blackOne));
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
Stone stone3 = new Stone(1, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(1, StoneColor.BLACK);
|
|
|
|
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(stone3, stone4));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redJoker, set1);
|
|
|
|
mockTable.findStoneSet.put(stone4, set2);
|
|
|
|
mockTable.findStoneSet.put(blackOne, set2);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, false);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(redJoker, false);
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker));
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone4, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(blackOne, false);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(stone4, false);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(blackOne, false);
|
|
|
|
assertCollection(Arrays.asList(stone3, stone4));
|
|
|
|
assertCollection(Arrays.asList(redOne, blackOne));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -380,22 +371,18 @@ public class TurnControlTest {
|
|
|
|
public void collectSetOnTable() {
|
|
|
|
public void collectSetOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redJoker, blackJoker));
|
|
|
|
Stone stone2 = new Stone(StoneColor.BLACK);
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(redOne, blackOne));
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
Stone stone3 = new Stone(1, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(1, StoneColor.BLACK);
|
|
|
|
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(stone3, stone4));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redJoker, set1);
|
|
|
|
mockTable.findStoneSet.put(stone4, set2);
|
|
|
|
mockTable.findStoneSet.put(blackOne, set2);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(stone1, true);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(redJoker, true);
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker));
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone4, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(blackOne, true);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(stone4, true);
|
|
|
|
mockView.tablePanel.setClickEvent.emit(blackOne, true);
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2, stone3, stone4));
|
|
|
|
assertCollection(Arrays.asList(redJoker, blackJoker, redOne, blackOne));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -403,20 +390,16 @@ public class TurnControlTest {
|
|
|
|
public void rangeSelectOnTableReverse() {
|
|
|
|
public void rangeSelectOnTableReverse() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne, redTwo, redThree,
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
redFour));
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, stone4));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
mockTable.findStoneSet.put(stone3, set1);
|
|
|
|
mockTable.findStoneSet.put(redThree, set1);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone3, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redThree, false);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(stone1, true);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(redOne, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2, stone3));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo, redThree));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -424,20 +407,17 @@ public class TurnControlTest {
|
|
|
|
public void rangeSelectOnTable() {
|
|
|
|
public void rangeSelectOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, stone4));
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne, redTwo, redThree,
|
|
|
|
|
|
|
|
stone4));
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
mockTable.findStoneSet.put(stone3, set1);
|
|
|
|
mockTable.findStoneSet.put(redThree, set1);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, false);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(stone3, true);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(redThree, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2, stone3));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo, redThree));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -445,23 +425,18 @@ public class TurnControlTest {
|
|
|
|
public void rangeCollectOnTable() {
|
|
|
|
public void rangeCollectOnTable() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone extraStone = new Stone(StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne, redTwo, redThree,
|
|
|
|
|
|
|
|
redFour));
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
mockTable.findStoneSet.put(redThree, set1);
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, stone4));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redJoker, false);
|
|
|
|
mockTable.findStoneSet.put(stone3, set1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(extraStone, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, true);
|
|
|
|
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(redThree, false);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, true);
|
|
|
|
assertCollection(Arrays.asList(redJoker, redOne, redTwo, redThree));
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(stone3, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(extraStone, stone1, stone2, stone3));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -469,24 +444,19 @@ public class TurnControlTest {
|
|
|
|
public void rangeFailSelect() {
|
|
|
|
public void rangeFailSelect() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(redTwo));
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1));
|
|
|
|
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(stone2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
mockTable.findStoneSet.put(stone2, set2);
|
|
|
|
mockTable.findStoneSet.put(redTwo, set2);
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, false);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne));
|
|
|
|
assertCollection(Arrays.asList(stone1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(stone2, false);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(redTwo, false);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo));
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -494,23 +464,19 @@ public class TurnControlTest {
|
|
|
|
public void rangeFailCollect() {
|
|
|
|
public void rangeFailCollect() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(redTwo));
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1));
|
|
|
|
|
|
|
|
StoneSet set2 = new StoneSet(Arrays.asList(stone2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
mockTable.findStoneSet.put(stone2, set2);
|
|
|
|
mockTable.findStoneSet.put(redTwo, set2);
|
|
|
|
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, true);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, true);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne));
|
|
|
|
assertCollection(Arrays.asList(stone1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(stone2, true);
|
|
|
|
mockView.tablePanel.rangeClickEvent.emit(redTwo, true);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo));
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -518,19 +484,15 @@ public class TurnControlTest {
|
|
|
|
public void rangeSelectOnHandReverse() {
|
|
|
|
public void rangeSelectOnHandReverse() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockHand.drop(redOne, new Position(0, 0));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
mockHand.drop(redTwo, new Position(1.5f, 0));
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
mockHand.drop(redThree, new Position(0, 1));
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
mockHand.drop(redFour, new Position(1, 1));
|
|
|
|
mockHand.drop(stone1, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone2, new Position(1.5f, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone3, new Position(0, 1));
|
|
|
|
|
|
|
|
mockHand.drop(stone4, new Position(1, 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(stone3, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redThree, false);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(stone1, true);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(redOne, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2, stone3));
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo, redThree));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -538,19 +500,15 @@ public class TurnControlTest {
|
|
|
|
public void rangeSelectOnHand() {
|
|
|
|
public void rangeSelectOnHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockHand.drop(redOne, new Position(0, 0));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
mockHand.drop(redTwo, new Position(1.5f, 0));
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
mockHand.drop(redThree, new Position(0, 1));
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
mockHand.drop(redFour, new Position(1, 1));
|
|
|
|
mockHand.drop(stone1, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone2, new Position(1.5f, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone3, new Position(0, 1));
|
|
|
|
|
|
|
|
mockHand.drop(stone4, new Position(1, 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redOne, false);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(stone3, true);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(redThree, true);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2, stone3));
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo, redThree));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -558,22 +516,16 @@ public class TurnControlTest {
|
|
|
|
public void rangeCollectOnHand() {
|
|
|
|
public void rangeCollectOnHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone extraStone = new Stone(StoneColor.RED);
|
|
|
|
mockHand.drop(redOne, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(redTwo, new Position(1.5f, 0));
|
|
|
|
|
|
|
|
mockHand.drop(redThree, new Position(0, 1));
|
|
|
|
|
|
|
|
mockHand.drop(redFour, new Position(1, 1));
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, false);
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone3 = new Stone(3, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone stone4 = new Stone(4, StoneColor.RED);
|
|
|
|
|
|
|
|
mockHand.drop(stone1, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone2, new Position(1.5f, 0));
|
|
|
|
|
|
|
|
mockHand.drop(stone3, new Position(0, 1));
|
|
|
|
|
|
|
|
mockHand.drop(stone4, new Position(1, 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(extraStone, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redOne, true);
|
|
|
|
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(redThree, false);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(stone1, true);
|
|
|
|
assertCollection(Arrays.asList(redJoker, redOne, redTwo, redThree));
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(stone3, false);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(extraStone, stone1, stone2, stone3));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -581,21 +533,18 @@ public class TurnControlTest {
|
|
|
|
public void rangeFailSelectHand() {
|
|
|
|
public void rangeFailSelectHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1));
|
|
|
|
mockHand.drop(redTwo, new Position(0, 0));
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
|
|
|
|
mockHand.drop(stone2, new Position(0, 0));
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, false);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1));
|
|
|
|
assertCollection(Arrays.asList(redOne));
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(stone2, false);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(redTwo, false);
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
/** */
|
|
|
@ -603,20 +552,16 @@ public class TurnControlTest {
|
|
|
|
public void rangeFailCollectHand() {
|
|
|
|
public void rangeFailCollectHand() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone stone1 = new Stone(1, StoneColor.RED);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(redOne));
|
|
|
|
Stone stone2 = new Stone(2, StoneColor.RED);
|
|
|
|
mockTable.findStoneSet.put(redOne, set1);
|
|
|
|
StoneSet set1 = new StoneSet(Arrays.asList(stone1));
|
|
|
|
mockHand.drop(redTwo, new Position(0, 0));
|
|
|
|
mockTable.findStoneSet.put(stone1, set1);
|
|
|
|
|
|
|
|
mockHand.drop(stone2, new Position(0, 0));
|
|
|
|
|
|
|
|
// Select first stone
|
|
|
|
// Select first stone
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(stone1, false);
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(redOne, false);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne));
|
|
|
|
assertCollection(Arrays.asList(stone1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select second stone
|
|
|
|
// Select second stone
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(stone2, true);
|
|
|
|
mockView.handPanel.rangeClickEvent.emit(redTwo, true);
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(redOne, redTwo));
|
|
|
|
assertCollection(Arrays.asList(stone1, stone2));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void assertCollection(List<Stone> expected) {
|
|
|
|
private void assertCollection(List<Stone> expected) {
|
|
|
@ -631,27 +576,15 @@ public class TurnControlTest {
|
|
|
|
public void testAddLeft() {
|
|
|
|
public void testAddLeft() {
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table, mockPlayer.getHand(),
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table,
|
|
|
|
mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN), new GameSettings(),
|
|
|
|
mockPlayer.getHand(), mockPlayer.getLaidOut(),
|
|
|
|
mockView);
|
|
|
|
TurnMode.NORMAL_TURN), new GameSettings(), mockView);
|
|
|
|
turnControl.startTurn();
|
|
|
|
turnControl.startTurn();
|
|
|
|
Stone blueOne = new Stone(1, BLUE);
|
|
|
|
|
|
|
|
Stone redOne = new Stone(1, RED);
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne,
|
|
|
|
Stone blackOne = new Stone(1, BLACK);
|
|
|
|
blackOne, redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
Stone blueTwo = new Stone(2, BLUE);
|
|
|
|
StoneSet oldSet2 = new StoneSet(Arrays.asList(blueTwo, blackFour,
|
|
|
|
Stone blueThree = new Stone(3, BLUE);
|
|
|
|
blackFive));
|
|
|
|
Stone blueFour = new Stone(4, BLUE);
|
|
|
|
|
|
|
|
Stone redTwo = new Stone(2, RED);
|
|
|
|
|
|
|
|
Stone redThree = new Stone(3, RED);
|
|
|
|
|
|
|
|
Stone redFour = new Stone(4, RED);
|
|
|
|
|
|
|
|
Stone blackTwo = new Stone(2, BLACK);
|
|
|
|
|
|
|
|
Stone blackThree = new Stone(3, BLACK);
|
|
|
|
|
|
|
|
Stone blackFour = new Stone(4, BLACK);
|
|
|
|
|
|
|
|
Stone blackFive = new Stone(5, BLACK);
|
|
|
|
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne, blackOne,
|
|
|
|
|
|
|
|
redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
|
|
|
|
StoneSet oldSet2 = new StoneSet(
|
|
|
|
|
|
|
|
Arrays.asList(blueTwo, blackFour, blackFive));
|
|
|
|
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
@ -750,27 +683,14 @@ public class TurnControlTest {
|
|
|
|
public void testAddRight() {
|
|
|
|
public void testAddRight() {
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table, mockPlayer.getHand(),
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table,
|
|
|
|
mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN), new GameSettings(),
|
|
|
|
mockPlayer.getHand(), mockPlayer.getLaidOut(),
|
|
|
|
mockView);
|
|
|
|
TurnMode.NORMAL_TURN), new GameSettings(), mockView);
|
|
|
|
turnControl.startTurn();
|
|
|
|
turnControl.startTurn();
|
|
|
|
Stone blueOne = new Stone(1, BLUE);
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne,
|
|
|
|
Stone redOne = new Stone(1, RED);
|
|
|
|
blackOne, redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
Stone blackOne = new Stone(1, BLACK);
|
|
|
|
StoneSet oldSet2 = new StoneSet(Arrays.asList(blueTwo, blackFour,
|
|
|
|
Stone blueTwo = new Stone(2, BLUE);
|
|
|
|
blackFive));
|
|
|
|
Stone blueThree = new Stone(3, BLUE);
|
|
|
|
|
|
|
|
Stone blueFour = new Stone(4, BLUE);
|
|
|
|
|
|
|
|
Stone redTwo = new Stone(2, RED);
|
|
|
|
|
|
|
|
Stone redThree = new Stone(3, RED);
|
|
|
|
|
|
|
|
Stone redFour = new Stone(4, RED);
|
|
|
|
|
|
|
|
Stone blackTwo = new Stone(2, BLACK);
|
|
|
|
|
|
|
|
Stone blackThree = new Stone(3, BLACK);
|
|
|
|
|
|
|
|
Stone blackFour = new Stone(4, BLACK);
|
|
|
|
|
|
|
|
Stone blackFive = new Stone(5, BLACK);
|
|
|
|
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne, blackOne,
|
|
|
|
|
|
|
|
redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
|
|
|
|
StoneSet oldSet2 = new StoneSet(
|
|
|
|
|
|
|
|
Arrays.asList(blueTwo, blackFour, blackFive));
|
|
|
|
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
@ -869,27 +789,14 @@ public class TurnControlTest {
|
|
|
|
public void testAddNewSet() {
|
|
|
|
public void testAddNewSet() {
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
AccessibleTable table = new AccessibleTable();
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table, mockPlayer.getHand(),
|
|
|
|
turnControl.setup(new ITurnControl.TurnInfo(table,
|
|
|
|
mockPlayer.getLaidOut(), TurnMode.NORMAL_TURN), new GameSettings(),
|
|
|
|
mockPlayer.getHand(), mockPlayer.getLaidOut(),
|
|
|
|
mockView);
|
|
|
|
TurnMode.NORMAL_TURN), new GameSettings(), mockView);
|
|
|
|
turnControl.startTurn();
|
|
|
|
turnControl.startTurn();
|
|
|
|
Stone blueOne = new Stone(1, BLUE);
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne,
|
|
|
|
Stone redOne = new Stone(1, RED);
|
|
|
|
blackOne, redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
Stone blackOne = new Stone(1, BLACK);
|
|
|
|
StoneSet oldSet2 = new StoneSet(Arrays.asList(blueTwo, blackFour,
|
|
|
|
Stone blueTwo = new Stone(2, BLUE);
|
|
|
|
blackFive));
|
|
|
|
Stone blueThree = new Stone(3, BLUE);
|
|
|
|
|
|
|
|
Stone blueFour = new Stone(4, BLUE);
|
|
|
|
|
|
|
|
Stone redTwo = new Stone(2, RED);
|
|
|
|
|
|
|
|
Stone redThree = new Stone(3, RED);
|
|
|
|
|
|
|
|
Stone redFour = new Stone(4, RED);
|
|
|
|
|
|
|
|
Stone blackTwo = new Stone(2, BLACK);
|
|
|
|
|
|
|
|
Stone blackThree = new Stone(3, BLACK);
|
|
|
|
|
|
|
|
Stone blackFour = new Stone(4, BLACK);
|
|
|
|
|
|
|
|
Stone blackFive = new Stone(5, BLACK);
|
|
|
|
|
|
|
|
StoneSet oldSet1 = new StoneSet(Arrays.asList(blueOne, redOne, blackOne,
|
|
|
|
|
|
|
|
redTwo, redThree, redFour, blackTwo, blackThree));
|
|
|
|
|
|
|
|
StoneSet oldSet2 = new StoneSet(
|
|
|
|
|
|
|
|
Arrays.asList(blueTwo, blackFour, blackFive));
|
|
|
|
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet1, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
table.drop(oldSet2, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
|
mockHand.drop(blueThree, new Position(0, 0));
|
|
|
@ -962,28 +869,15 @@ public class TurnControlTest {
|
|
|
|
public void testSortByGroups() {
|
|
|
|
public void testSortByGroups() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone red1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockHand.drop(redOne, new Position(0, 0));
|
|
|
|
Stone blue2 = new Stone(2, StoneColor.BLUE);
|
|
|
|
mockHand.drop(blueTwo, new Position(0, 0));
|
|
|
|
Stone red4 = new Stone(4, StoneColor.RED);
|
|
|
|
mockHand.drop(redFour, new Position(0, 0));
|
|
|
|
Stone red3 = new Stone(3, StoneColor.RED);
|
|
|
|
mockHand.drop(redThree, new Position(0, 0));
|
|
|
|
Stone orange10 = new Stone(10, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone blue1 = new Stone(1, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone blue4 = new Stone(4, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone blue4a = new Stone(4, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone joker = new Stone(StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone black5 = new Stone(5, StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone orange13 = new Stone(13, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone red11 = new Stone(11, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone black10 = new Stone(10, StoneColor.BLACK);
|
|
|
|
|
|
|
|
mockHand.drop(red1, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(blue2, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(red4, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(red3, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(orange10, new Position(0, 0));
|
|
|
|
mockHand.drop(orange10, new Position(0, 0));
|
|
|
|
mockHand.drop(blue1, new Position(0, 0));
|
|
|
|
mockHand.drop(blueOne, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4, new Position(0, 0));
|
|
|
|
mockHand.drop(blueFour, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4a, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4a, new Position(0, 0));
|
|
|
|
mockHand.drop(joker, new Position(0, 0));
|
|
|
|
mockHand.drop(blackJoker, new Position(0, 0));
|
|
|
|
mockHand.drop(black5, new Position(0, 0));
|
|
|
|
mockHand.drop(black5, new Position(0, 0));
|
|
|
|
mockHand.drop(orange13, new Position(0, 0));
|
|
|
|
mockHand.drop(orange13, new Position(0, 0));
|
|
|
|
mockHand.drop(red11, new Position(0, 0));
|
|
|
|
mockHand.drop(red11, new Position(0, 0));
|
|
|
@ -993,28 +887,28 @@ public class TurnControlTest {
|
|
|
|
|
|
|
|
|
|
|
|
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
|
|
|
|
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
|
|
|
|
mockHand.stones);
|
|
|
|
mockHand.stones);
|
|
|
|
Collections
|
|
|
|
Collections.sort(stones,
|
|
|
|
.sort(stones, new HumanTurnControl.HandStonePositionComparator());
|
|
|
|
new HumanTurnControl.HandStonePositionComparator());
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals(stones.size(), 13);
|
|
|
|
assertEquals(stones.size(), 13);
|
|
|
|
|
|
|
|
|
|
|
|
assertSame(stones.get(0).getFirst(), blue1);
|
|
|
|
assertSame(stones.get(0).getFirst(), blueOne);
|
|
|
|
assertSame(stones.get(1).getFirst(), red1);
|
|
|
|
assertSame(stones.get(1).getFirst(), redOne);
|
|
|
|
assertSame(stones.get(2).getFirst(), blue2);
|
|
|
|
assertSame(stones.get(2).getFirst(), blueTwo);
|
|
|
|
assertSame(stones.get(3).getFirst(), red3);
|
|
|
|
assertSame(stones.get(3).getFirst(), redThree);
|
|
|
|
|
|
|
|
|
|
|
|
assertTrue(stones.get(4).getFirst() == blue4
|
|
|
|
assertTrue(stones.get(4).getFirst() == blueFour
|
|
|
|
|| stones.get(4).getFirst() == blue4a);
|
|
|
|
|| stones.get(4).getFirst() == blue4a);
|
|
|
|
assertTrue(stones.get(5).getFirst() == blue4
|
|
|
|
assertTrue(stones.get(5).getFirst() == blueFour
|
|
|
|
|| stones.get(5).getFirst() == blue4a);
|
|
|
|
|| stones.get(5).getFirst() == blue4a);
|
|
|
|
|
|
|
|
|
|
|
|
assertSame(stones.get(6).getFirst(), red4);
|
|
|
|
assertSame(stones.get(6).getFirst(), redFour);
|
|
|
|
assertSame(stones.get(7).getFirst(), black5);
|
|
|
|
assertSame(stones.get(7).getFirst(), black5);
|
|
|
|
assertSame(stones.get(8).getFirst(), black10);
|
|
|
|
assertSame(stones.get(8).getFirst(), black10);
|
|
|
|
assertSame(stones.get(9).getFirst(), orange10);
|
|
|
|
assertSame(stones.get(9).getFirst(), orange10);
|
|
|
|
assertSame(stones.get(10).getFirst(), red11);
|
|
|
|
assertSame(stones.get(10).getFirst(), red11);
|
|
|
|
assertSame(stones.get(11).getFirst(), orange13);
|
|
|
|
assertSame(stones.get(11).getFirst(), orange13);
|
|
|
|
assertSame(stones.get(12).getFirst(), joker);
|
|
|
|
assertSame(stones.get(12).getFirst(), blackJoker);
|
|
|
|
|
|
|
|
|
|
|
|
checkHandDisplay(mockHand);
|
|
|
|
checkHandDisplay(mockHand);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1024,28 +918,15 @@ public class TurnControlTest {
|
|
|
|
public void testSortByRuns() {
|
|
|
|
public void testSortByRuns() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone red1 = new Stone(1, StoneColor.RED);
|
|
|
|
mockHand.drop(redOne, new Position(0, 0));
|
|
|
|
Stone blue2 = new Stone(2, StoneColor.BLUE);
|
|
|
|
mockHand.drop(blueTwo, new Position(0, 0));
|
|
|
|
Stone red4 = new Stone(4, StoneColor.RED);
|
|
|
|
mockHand.drop(redFour, new Position(0, 0));
|
|
|
|
Stone red3 = new Stone(3, StoneColor.RED);
|
|
|
|
mockHand.drop(redThree, new Position(0, 0));
|
|
|
|
Stone orange10 = new Stone(10, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone blue1 = new Stone(1, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone blue4 = new Stone(4, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone blue4a = new Stone(4, StoneColor.BLUE);
|
|
|
|
|
|
|
|
Stone joker = new Stone(StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone black5 = new Stone(5, StoneColor.BLACK);
|
|
|
|
|
|
|
|
Stone orange13 = new Stone(13, StoneColor.ORANGE);
|
|
|
|
|
|
|
|
Stone red11 = new Stone(11, StoneColor.RED);
|
|
|
|
|
|
|
|
Stone black10 = new Stone(10, StoneColor.BLACK);
|
|
|
|
|
|
|
|
mockHand.drop(red1, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(blue2, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(red4, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(red3, new Position(0, 0));
|
|
|
|
|
|
|
|
mockHand.drop(orange10, new Position(0, 0));
|
|
|
|
mockHand.drop(orange10, new Position(0, 0));
|
|
|
|
mockHand.drop(blue1, new Position(0, 0));
|
|
|
|
mockHand.drop(blueOne, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4, new Position(0, 0));
|
|
|
|
mockHand.drop(blueFour, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4a, new Position(0, 0));
|
|
|
|
mockHand.drop(blue4a, new Position(0, 0));
|
|
|
|
mockHand.drop(joker, new Position(0, 0));
|
|
|
|
mockHand.drop(blackJoker, new Position(0, 0));
|
|
|
|
mockHand.drop(black5, new Position(0, 0));
|
|
|
|
mockHand.drop(black5, new Position(0, 0));
|
|
|
|
mockHand.drop(orange13, new Position(0, 0));
|
|
|
|
mockHand.drop(orange13, new Position(0, 0));
|
|
|
|
mockHand.drop(red11, new Position(0, 0));
|
|
|
|
mockHand.drop(red11, new Position(0, 0));
|
|
|
@ -1055,8 +936,8 @@ public class TurnControlTest {
|
|
|
|
|
|
|
|
|
|
|
|
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
|
|
|
|
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
|
|
|
|
mockHand.stones);
|
|
|
|
mockHand.stones);
|
|
|
|
Collections
|
|
|
|
Collections.sort(stones,
|
|
|
|
.sort(stones, new HumanTurnControl.HandStonePositionComparator());
|
|
|
|
new HumanTurnControl.HandStonePositionComparator());
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals(stones.size(), 13);
|
|
|
|
assertEquals(stones.size(), 13);
|
|
|
|
|
|
|
|
|
|
|
@ -1064,19 +945,19 @@ public class TurnControlTest {
|
|
|
|
assertSame(stones.get(1).getFirst(), black10);
|
|
|
|
assertSame(stones.get(1).getFirst(), black10);
|
|
|
|
assertSame(stones.get(2).getFirst(), orange10);
|
|
|
|
assertSame(stones.get(2).getFirst(), orange10);
|
|
|
|
assertSame(stones.get(3).getFirst(), orange13);
|
|
|
|
assertSame(stones.get(3).getFirst(), orange13);
|
|
|
|
assertSame(stones.get(4).getFirst(), blue1);
|
|
|
|
assertSame(stones.get(4).getFirst(), blueOne);
|
|
|
|
assertSame(stones.get(5).getFirst(), blue2);
|
|
|
|
assertSame(stones.get(5).getFirst(), blueTwo);
|
|
|
|
|
|
|
|
|
|
|
|
assertTrue(stones.get(6).getFirst() == blue4
|
|
|
|
assertTrue(stones.get(6).getFirst() == blueFour
|
|
|
|
|| stones.get(6).getFirst() == blue4a);
|
|
|
|
|| stones.get(6).getFirst() == blue4a);
|
|
|
|
assertTrue(stones.get(7).getFirst() == blue4
|
|
|
|
assertTrue(stones.get(7).getFirst() == blueFour
|
|
|
|
|| stones.get(7).getFirst() == blue4a);
|
|
|
|
|| stones.get(7).getFirst() == blue4a);
|
|
|
|
|
|
|
|
|
|
|
|
assertSame(stones.get(8).getFirst(), red1);
|
|
|
|
assertSame(stones.get(8).getFirst(), redOne);
|
|
|
|
assertSame(stones.get(9).getFirst(), red3);
|
|
|
|
assertSame(stones.get(9).getFirst(), redThree);
|
|
|
|
assertSame(stones.get(10).getFirst(), red4);
|
|
|
|
assertSame(stones.get(10).getFirst(), redFour);
|
|
|
|
assertSame(stones.get(11).getFirst(), red11);
|
|
|
|
assertSame(stones.get(11).getFirst(), red11);
|
|
|
|
assertSame(stones.get(12).getFirst(), joker);
|
|
|
|
assertSame(stones.get(12).getFirst(), blackJoker);
|
|
|
|
|
|
|
|
|
|
|
|
checkHandDisplay(mockHand);
|
|
|
|
checkHandDisplay(mockHand);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1086,21 +967,18 @@ public class TurnControlTest {
|
|
|
|
public void testDropHandValid() {
|
|
|
|
public void testDropHandValid() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
mockHand.drop(redJoker, new Position(0, 0));
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockHand.drop(blackJoker, new Position(1, 0));
|
|
|
|
|
|
|
|
|
|
|
|
mockHand.drop(firstStone, new Position(0, 0));
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
mockHand.drop(secondStone, new Position(1, 0));
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.clickEvent.emit(new Position(2, 0.25f));
|
|
|
|
mockView.handPanel.clickEvent.emit(new Position(2, 0.25f));
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(new ArrayList<Stone>());
|
|
|
|
assertCollection(new ArrayList<Stone>());
|
|
|
|
|
|
|
|
|
|
|
|
Set<Stone> expected = new HashSet<Stone>(Arrays.asList(firstStone,
|
|
|
|
Set<Stone> expected = new HashSet<Stone>(Arrays.asList(redJoker,
|
|
|
|
secondStone));
|
|
|
|
blackJoker));
|
|
|
|
assertEquals(expected, mockHand.pickups);
|
|
|
|
assertEquals(expected, mockHand.pickups);
|
|
|
|
|
|
|
|
|
|
|
|
Set<Stone> handStones = new HashSet<Stone>();
|
|
|
|
Set<Stone> handStones = new HashSet<Stone>();
|
|
|
@ -1116,23 +994,19 @@ public class TurnControlTest {
|
|
|
|
public void testDropHandInvalid() {
|
|
|
|
public void testDropHandInvalid() {
|
|
|
|
testControl.startTurn();
|
|
|
|
testControl.startTurn();
|
|
|
|
|
|
|
|
|
|
|
|
Stone firstStone = new Stone(StoneColor.RED);
|
|
|
|
mockHand.drop(redJoker, new Position(0, 0));
|
|
|
|
Stone secondStone = new Stone(StoneColor.BLACK);
|
|
|
|
mockHand.drop(black13, new Position(1, 0));
|
|
|
|
Stone thirdStone = new Stone(13, StoneColor.BLACK);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockHand.drop(firstStone, new Position(0, 0));
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(redJoker, true);
|
|
|
|
mockHand.drop(thirdStone, new Position(1, 0));
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(blackJoker, true);
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(black13, true);
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(firstStone, true);
|
|
|
|
|
|
|
|
mockView.tablePanel.stoneClickEvent.emit(secondStone, true);
|
|
|
|
|
|
|
|
mockView.handPanel.stoneClickEvent.emit(thirdStone, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mockView.handPanel.clickEvent.emit(new Position(2, 0.25f));
|
|
|
|
mockView.handPanel.clickEvent.emit(new Position(2, 0.25f));
|
|
|
|
|
|
|
|
|
|
|
|
assertCollection(Arrays.asList(secondStone));
|
|
|
|
assertCollection(Arrays.asList(blackJoker));
|
|
|
|
|
|
|
|
|
|
|
|
Set<Stone> expected = new HashSet<Stone>(Arrays.asList(firstStone,
|
|
|
|
Set<Stone> expected = new HashSet<Stone>(Arrays.asList(redJoker,
|
|
|
|
thirdStone));
|
|
|
|
black13));
|
|
|
|
assertEquals(expected, mockHand.pickups);
|
|
|
|
assertEquals(expected, mockHand.pickups);
|
|
|
|
|
|
|
|
|
|
|
|
Set<Stone> handStones = new HashSet<Stone>();
|
|
|
|
Set<Stone> handStones = new HashSet<Stone>();
|
|
|
|