Skip to content

Commit

Permalink
Class Cmd documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnDreJOO2 committed Jun 9, 2022
1 parent c211711 commit 99c31ff
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions src/dataset/replay_data/replay_parser/game_events/events/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@

from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent


# TODO: Can the sequence be an int here?
# Should this be encoded somehow if there is a NoneType detected?

# TODO: Document the docstrings


class Cmd(GameEvent):
"""_summary_
"""
Cmd is containing some "details" information about command interface events
:param id: _description_
:param id: Specifies the ID of an event which corresponds to its name.
:type id: int
:param loop: _description_
:param loop: Specifies the game loop number (game-engine tick) when at which the event occurred
:type loop: int
:param otherUnit: _description_
:param otherUnit: There is no specific information about this parameter
:type otherUnit: NoneType
:param sequence: _description_
:param sequence: Highly likely this parameter specifies an id parameter which sequence user has typed in the console,
there is no specific information about this parameter
:type sequence: int
:param unitGroup: _description_
:param unitGroup: There is no specific information about this parameter
:type unitGroup: NoneType | int
:param userid: _description_
:param userid: Highly likely this parameter specifies a user's id who has been using interface, there is no specific information.
:type userid: int
"""

@staticmethod
def from_dict(d: Dict) -> "Cmd":
"""_summary_
"""
Static method returning initialized Cmd class from a dictionary. This helps with the original JSON parsing.
:param d: _description_
:param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file.
:type d: Dict
:return: _description_
:return: Returns an initialized Cmd class.
:rtype: Cmd
"""
return Cmd(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ControlGroupUpdate(GameEvent):
:type id: int
:param loop: Specifies the game loop number (game-engine tick) when at which the event occurred
:type loop: int
:param userid: Specifies id number of player who has updated the group control the game, example: in 1v1 game: [0,1]
:param userid: Specifies id number of player who has updated the group control the game
:type userid: int
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GameUserLeave(GameEvent):
:type leaveReason: int
:param loop: Specifies the game loop number (game-engine tick) when at which the event occurred
:type loop: int
:param userid: Specifies id number of player who has left the game, example: in 1v1 game: [0,1]
:param userid: Specifies id number of player who has left the game
:type userid: int
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SelectionDelta(GameEvent):
:type id: int
:param loop: Specifies the game loop number (game-engine tick) when at which the event occurred
:type loop: int
:param userid: Specifies id number of player who has done selection option in the game, example: in 1v1 game: [0,1]
:param userid: Specifies id number of player who has done selection option in the game
:type userid: int
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UserOptions(GameEvent):
:type testCheatsEnabled: bool
:param useGalaxyAsserts: There is no valuable information about this parameter
:type useGalaxyAsserts: bool
:param userid: Specifies the id of the player who has been the owner of the options in the game, example: in 1v1 game: [0,1]
:param userid: Specifies the id of the player who has been the owner of the options in the game
:type userid: int
:param versionFlags: There is no valuable information about this parameter, might it be a player's setting version,
default = 0
Expand Down

0 comments on commit 99c31ff

Please sign in to comment.