package cz.davza.studentadventure.commands; import cz.davza.studentadventure.annotations.CommandKeyword; import cz.davza.studentadventure.base.CommandBase; import cz.davza.studentadventure.objects.CommandResult; import cz.davza.studentadventure.objects.GameData; /** * Displays the full command reference for the game. * *
Usage: {@code help}
* *Prints a static list of every command keyword and a short description of * what it does. Available in all rooms. No parameters are required.
*/ @CommandKeyword("help") public class HelpCommand extends CommandBase { /** * {@inheritDoc} * Returns the full command reference as a formatted string. */ @Override public CommandResult Execute(GameData context) { return CommandResult.success(printHelp()); } /** * Builds and returns the command reference text. * * @return a multi-line string listing all available commands and their usage */ private String printHelp() { return """ === COMMANDS === walk