Calculate points on hand
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@264 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
92d1109954
commit
4a98975b0d
10 changed files with 88 additions and 15 deletions
|
@ -19,7 +19,7 @@ public class HandTest {
|
|||
/** */
|
||||
@Before
|
||||
public void setUp() {
|
||||
hand = new Hand();
|
||||
hand = new Hand(new GameSettings());
|
||||
}
|
||||
|
||||
/** */
|
||||
|
@ -111,4 +111,19 @@ public class HandTest {
|
|||
assertEquals(new Position(13, 1), hand.getPosition(newStone));
|
||||
assertEquals(new Position(0, 2), hand.getPosition(rowStones.get(13)));
|
||||
}
|
||||
|
||||
/** */
|
||||
@Test
|
||||
public void testCountPoints() {
|
||||
|
||||
Stone stone1 = new Stone(2, BLUE);
|
||||
Stone stone2 = new Stone(4, BLUE);
|
||||
Stone stone3 = new Stone(RED);
|
||||
|
||||
hand.drop(stone1, new Position(0, 0));
|
||||
hand.drop(stone2, new Position(0, 0));
|
||||
hand.drop(stone3, new Position(0, 0));
|
||||
|
||||
assertEquals(56, hand.getStonePoints());
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue