summaryrefslogtreecommitdiff
path: root/src/test/java/org/luxons
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-01-14 03:45:24 +0100
committerJoffrey BION <joffrey.bion@gmail.com>2017-01-14 03:45:24 +0100
commit687aebaaed106897d169f50110f3d42ace285542 (patch)
treef6a8a482994a4149173a2e918eb5f91423783b10 /src/test/java/org/luxons
parentAdd actual points computation from copied guild (diff)
downloadseven-wonders-687aebaaed106897d169f50110f3d42ace285542.tar.gz
seven-wonders-687aebaaed106897d169f50110f3d42ace285542.tar.bz2
seven-wonders-687aebaaed106897d169f50110f3d42ace285542.zip
Add support for '1 free per age' special ability
Diffstat (limited to 'src/test/java/org/luxons')
-rw-r--r--src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java b/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java
index 4475fd3b..494b9e4c 100644
--- a/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java
+++ b/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java
@@ -105,42 +105,24 @@ public class HandsTest {
}
@Test
- public void rotate_doesNotMoveWhenOffsetIsZero() {
+ public void rotate_movesOfCorrectOffset_right() {
Hands hands = createHands(3, 7);
- Hands rotated = hands.rotate(0);
- assertEquals(rotated.get(0), hands.get(0));
- assertEquals(rotated.get(1), hands.get(1));
- assertEquals(rotated.get(2), hands.get(2));
- }
-
- @Test
- public void rotate_movesOfCorrectOffset_positive() {
- Hands hands = createHands(3, 7);
- Hands rotated = hands.rotate(1);
+ Hands rotated = hands.rotate(HandRotationDirection.RIGHT);
assertEquals(rotated.get(1), hands.get(0));
assertEquals(rotated.get(2), hands.get(1));
assertEquals(rotated.get(0), hands.get(2));
}
@Test
- public void rotate_movesOfCorrectOffset_negative() {
+ public void rotate_movesOfCorrectOffset_left() {
Hands hands = createHands(3, 7);
- Hands rotated = hands.rotate(-1);
+ Hands rotated = hands.rotate(HandRotationDirection.LEFT);
assertEquals(rotated.get(2), hands.get(0));
assertEquals(rotated.get(0), hands.get(1));
assertEquals(rotated.get(1), hands.get(2));
}
@Test
- public void rotate_movesOfCorrectOffset_negative2() {
- Hands hands = createHands(3, 7);
- Hands rotated = hands.rotate(-2);
- assertEquals(rotated.get(1), hands.get(0));
- assertEquals(rotated.get(2), hands.get(1));
- assertEquals(rotated.get(0), hands.get(2));
- }
-
- @Test
public void createHand_containsAllCards() {
List<Card> hand0 = TestUtils.createSampleCards(0, 5);
List<Card> hand1 = TestUtils.createSampleCards(5, 10);
bgstack15