diff --git a/squirrelbattle/tests/game_test.py b/squirrelbattle/tests/game_test.py index 8203299..b21a753 100644 --- a/squirrelbattle/tests/game_test.py +++ b/squirrelbattle/tests/game_test.py @@ -473,7 +473,7 @@ class TestGame(unittest.TestCase): self.game.state = GameMode.PLAY sunflower = Sunflower() - sunflower.move(2, 6) + sunflower.move(self.game.player.y + 1, self.game.player.x) self.game.map.add_entity(sunflower) # Does nothing @@ -504,15 +504,15 @@ class TestGame(unittest.TestCase): Sunflower.dialogue_option) # Test all directions to detect the friendly entity - self.game.player.move(3, 6) + self.game.player.move(sunflower.y + 1, sunflower.x) self.game.handle_key_pressed(KeyValues.CHAT) self.game.handle_key_pressed(KeyValues.UP) self.assertEqual(len(self.game.logs.messages), 3) - self.game.player.move(2, 7) + self.game.player.move(sunflower.y, sunflower.x + 1) self.game.handle_key_pressed(KeyValues.CHAT) self.game.handle_key_pressed(KeyValues.LEFT) self.assertEqual(len(self.game.logs.messages), 4) - self.game.player.move(2, 5) + self.game.player.move(sunflower.y, sunflower.x - 1) self.game.handle_key_pressed(KeyValues.CHAT) self.game.handle_key_pressed(KeyValues.RIGHT) self.assertEqual(len(self.game.logs.messages), 5) @@ -524,7 +524,7 @@ class TestGame(unittest.TestCase): self.game.state = GameMode.PLAY merchant = Merchant() - merchant.move(2, 6) + merchant.move(self.game.player.y + 1, self.game.player.x) self.game.map.add_entity(merchant) # Does nothing