From e1918ab06696418d6d29bef357b4bd4129a9761e Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 18 Dec 2020 17:40:52 +0100 Subject: [PATCH] tick function takes the player as argument --- squirrelbattle/tests/entities_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/squirrelbattle/tests/entities_test.py b/squirrelbattle/tests/entities_test.py index f1ffb16..221fa5f 100644 --- a/squirrelbattle/tests/entities_test.py +++ b/squirrelbattle/tests/entities_test.py @@ -57,17 +57,17 @@ class TestEntities(unittest.TestCase): self.map.add_entity(entity) entity.move(15, 44) # Move randomly - self.map.tick() + self.map.tick(self.player) self.assertFalse(entity.y == 15 and entity.x == 44) # Move to the player entity.move(3, 6) - self.map.tick() + self.map.tick(self.player) self.assertTrue(entity.y == 2 and entity.x == 6) # Rabbit should fight old_health = self.player.health - self.map.tick() + self.map.tick(self.player) self.assertTrue(entity.y == 2 and entity.x == 6) self.assertEqual(old_health - entity.strength, self.player.health) self.assertEqual(self.map.logs.messages[-1],