parseInput

fun parseInput(input: String, context: Game? = null): Game?

Parses user input and executes the corresponding command.

Return

The updated game context after command execution, or the original context if parsing failed.

Parameters

input

The user input string to parse.

context

The current game context, or null if no game is active.