game.core.commands.result

core/commands/result.py

Defines the result and status types for the game commands.

Includes CommandStatus enum (ok,error) and CommandResult class to encapsulate messages and execution status.

Classes

CommandResult(messages[, status])

Encapsulates messages and status returned by a command.

CommandStatus(value)

Status of a command execution.

class game.core.commands.result.CommandResult(messages: List[str], status: CommandStatus = CommandStatus.OK)

Bases: object

Encapsulates messages and status returned by a command.

messages: List[str]
status: CommandStatus = 'ok'
class game.core.commands.result.CommandStatus(value)

Bases: Enum

Status of a command execution.

ERROR = 'error'
OK = 'ok'