From 3924023a923f86f25b53b30591ba12f219c30beb Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 14 May 2020 16:24:59 +0200 Subject: [PATCH] Documentation fixes --- src/AI/AStarNode.py | 10 +++++++++- src/entities/Entity.py | 2 +- src/entities/Statistics.py | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/AI/AStarNode.py b/src/AI/AStarNode.py index ad867c2..1d01fd4 100644 --- a/src/AI/AStarNode.py +++ b/src/AI/AStarNode.py @@ -1,5 +1,13 @@ class AStarNode: def __init__(self, parent, action, state): + """ + Create a node used in A*. + + :type action: Rotations + :param parent: Parent node + :param action: Action (Rotation) + :param state: A tuple of coords as (x,y,rotation) + """ self.state = state self.parent = parent - self.action = action \ No newline at end of file + self.action = action diff --git a/src/entities/Entity.py b/src/entities/Entity.py index 12d023b..926db45 100644 --- a/src/entities/Entity.py +++ b/src/entities/Entity.py @@ -122,7 +122,7 @@ class Entity(pygame.sprite.Sprite): def getFacingCoord(self, screenRelative=True): """ - Gets coordinates forward to the player. + Gets coordinates forward to this entity. :param screenRelative: If true, the method returns absolute coords :return: Position tuple of (x,y) coords diff --git a/src/entities/Statistics.py b/src/entities/Statistics.py index 4ec45d9..fd425f1 100644 --- a/src/entities/Statistics.py +++ b/src/entities/Statistics.py @@ -2,6 +2,7 @@ class Statistics: def __init__(self, hp, hunger, thirst, stamina): """ Create a statistic object. Used to determine some object state (usually player's). + :param hp: Health points :param hunger: Hunger (it rises) :param thirst: Thirst (also rises)