monster #20

Merged
viud3133 merged 39 commits from monster into equipments 2025-10-30 12:05:40 +01:00
Showing only changes of commit c526a364a0 - Show all commits

View File

@ -18,6 +18,7 @@ public class MonsterTest {
private Player mockPlayer = mock(Player.class);
private World mockWorld = mock(World.class);
private Tile mockTile = mock(Tile.class);
@BeforeEach
void reset() {
@ -192,4 +193,13 @@ public class MonsterTest {
assertThat(true, equalTo(defaultShade.performAttack(Attacks.CHILL, mockPlayer)));
}
@Test
void troll_wont_move_to_tile_with_wrong_biome() {
Position destination = new Position(1, 3);
when(mockTile.getBiome()).thenReturn(Biomes.COAST);
when(mockWorld.getTileAtPosition(destination)).thenReturn(mockTile);
assertThat(false, equalTo(defaultTroll.moveTo(destination, mockWorld)));
}
}