Make highest value and number of stones dealt settable
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@337 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
c78e8e6448
commit
c004a07a42
11 changed files with 190 additions and 52 deletions
|
@ -54,7 +54,7 @@ public class StoneHeapTest {
|
|||
}
|
||||
|
||||
private int calculateTotalNumberOfStones(GameSettings testSettings) {
|
||||
int totalStones = testSettings.getHighestCard()
|
||||
int totalStones = testSettings.getHighestValue()
|
||||
* testSettings.getStoneSetNumber()
|
||||
* testSettings.getStoneColors().size()
|
||||
+ testSettings.getJokerNumber();
|
||||
|
@ -81,7 +81,7 @@ public class StoneHeapTest {
|
|||
*/
|
||||
@Theory
|
||||
public void fullColor(Pair<GameSettings, StoneHeap> data) {
|
||||
int stonesOfAColor = data.getFirst().getHighestCard()
|
||||
int stonesOfAColor = data.getFirst().getHighestValue()
|
||||
* data.getFirst().getStoneSetNumber();
|
||||
Map<StoneColor, Integer> counters = new HashMap<StoneColor, Integer>();
|
||||
for (StoneColor c : data.getFirst().getStoneColors()) {
|
||||
|
|
|
@ -31,8 +31,8 @@ public class StoneSetTest {
|
|||
moreColorSettings.setStoneColors(EnumSet.allOf(StoneColor.class));
|
||||
lessColorSettings.setStoneColors(new HashSet<StoneColor>(Arrays.asList(
|
||||
StoneColor.BLUE, StoneColor.RED, StoneColor.BLACK)));
|
||||
higherValueSettings.setHighestCard(17);
|
||||
lowerValueSettings.setHighestCard(10);
|
||||
higherValueSettings.setHighestValue(17);
|
||||
lowerValueSettings.setHighestValue(10);
|
||||
}
|
||||
|
||||
private void assertSet(StoneSet.Type expectedType, Integer expectedValue,
|
||||
|
|
Reference in a new issue