Move to closest player if it is close
This commit is contained in:
@ -23,6 +23,11 @@ class TestEntities(unittest.TestCase):
|
||||
self.assertEqual(entity.x, 64)
|
||||
self.assertIsNone(entity.act(self.map))
|
||||
|
||||
other_entity = Entity()
|
||||
other_entity.move(45, 68)
|
||||
self.assertEqual(entity.distance_squared(other_entity), 25)
|
||||
self.assertEqual(entity.distance(other_entity), 5)
|
||||
|
||||
def test_fighting_entities(self) -> None:
|
||||
"""
|
||||
Test some random stuff with fighting entities.
|
||||
|
Reference in New Issue
Block a user