game.core.input.input_handler

core/input/inputhandler.py

Handles parsing and executing user input commands.

Provides handle_input to convert raw user input into a CommandResult.

Functions

handle_input(game, raw)

Parse and execute a raw input string as a game command.

game.core.input.input_handler.handle_input(game, raw: str) CommandResult

Parse and execute a raw input string as a game command.

Parameters:
  • game (Game) – The game instance.

  • raw (str) – Raw user input string.

Returns:

Result containing messages produced by the command and execution status.

Return type:

CommandResult