From 05eb5c4ade122a5634f00aa541dea04a7516db7e Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 28 May 2022 09:02:52 -0700 Subject: [PATCH] Add some docstrings to ai.py --- erynrl/ai.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erynrl/ai.py b/erynrl/ai.py index 2301a74..867b236 100644 --- a/erynrl/ai.py +++ b/erynrl/ai.py @@ -16,7 +16,10 @@ from .object import Entity if TYPE_CHECKING: from .engine import Engine +# pylint: disable=too-few-public-methods class AI(Component): + '''An abstract class providing AI for an entity.''' + def __init__(self, entity: Entity) -> None: super().__init__() self.entity = entity @@ -26,6 +29,12 @@ class AI(Component): raise NotImplementedError() class HostileEnemy(AI): + '''Entity AI for a hostile enemy. + + The entity will wander around until it sees the hero, at which point it will + beeline for her. + ''' + def act(self, engine: 'Engine') -> Optional[Action]: visible_tiles = tcod.map.compute_fov( engine.map.tiles['transparent'],