diff options
Diffstat (limited to 'src/esieequest/engine/commands/HelpCommand.java')
-rw-r--r-- | src/esieequest/engine/commands/HelpCommand.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/esieequest/engine/commands/HelpCommand.java b/src/esieequest/engine/commands/HelpCommand.java new file mode 100644 index 0000000..8738a8e --- /dev/null +++ b/src/esieequest/engine/commands/HelpCommand.java | |||
@@ -0,0 +1,26 @@ | |||
1 | package esieequest.engine.commands; | ||
2 | |||
3 | import esieequest.game.Game; | ||
4 | import esieequest.game.Text; | ||
5 | import esieequest.ui.Viewable; | ||
6 | |||
7 | /** | ||
8 | * Prints the available commands. | ||
9 | * | ||
10 | * @author Pacien TRAN-GIRARD | ||
11 | */ | ||
12 | public class HelpCommand implements Executable { | ||
13 | |||
14 | @Override | ||
15 | public void execute(final String argument, final Game game, final Viewable view) { | ||
16 | |||
17 | if (!argument.isEmpty()) { | ||
18 | view.echo(Text.TOO_MANY_ARGUMENTS.toString()); | ||
19 | return; | ||
20 | } | ||
21 | |||
22 | view.echo(Command.listCommandsNamesString()); | ||
23 | |||
24 | } | ||
25 | |||
26 | } | ||