monster #20
@ -1,2 +0,0 @@
|
||||
public class Bäckahäst extends Monster implements CanMove, CanAttack {
|
||||
}
|
||||
6
src/main/java/Nixie.java
Normal file
6
src/main/java/Nixie.java
Normal file
@ -0,0 +1,6 @@
|
||||
public abstract class Nixie extends Monster implements CanMove, CanAttack {
|
||||
|
||||
public Nixie() {
|
||||
super(0,0,Monster.DEFAULT_POSITION);
|
||||
}
|
||||
}
|
||||
@ -1,2 +1,6 @@
|
||||
public class Troll extends Monster implements CanMove, CanAttack {
|
||||
public abstract class Troll extends Monster implements CanMove, CanAttack {
|
||||
|
||||
public Troll() {
|
||||
super(0,0,Monster.DEFAULT_POSITION);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import java.util.*;
|
||||
import static org.hamcrest.MatcherAssert.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
|
||||
public class MonsterTest {
|
||||
@ -65,6 +65,13 @@ public class MonsterTest {
|
||||
assertThat(legalDestinations, hasItem(defaultShade.getPosition()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void shade_wont_move_to_same_position_as_player() {
|
||||
Position destination = new Position(1, 1);
|
||||
when(defaultPlayer.getPosition()).thenReturn(destination);
|
||||
assertThat(defaultShade.moveTo(destination), equalTo(false));
|
||||
}
|
||||
|
||||
@Test
|
||||
void monster_cannot_do_anything_when_out_of_energy() {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user