aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/engine/commands/KillCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/esieequest/engine/commands/KillCommand.java')
-rw-r--r--src/esieequest/engine/commands/KillCommand.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/esieequest/engine/commands/KillCommand.java b/src/esieequest/engine/commands/KillCommand.java
new file mode 100644
index 0000000..9f5dc49
--- /dev/null
+++ b/src/esieequest/engine/commands/KillCommand.java
@@ -0,0 +1,28 @@
1package esieequest.engine.commands;
2
3import esieequest.game.Game;
4import esieequest.game.Text;
5import esieequest.ui.View;
6
7/**
8 * Allows the user to commit suicide.
9 *
10 * @author Benoit LUBRANO DI SBARAGLIONE
11 */
12public class KillCommand implements Executable {
13
14 @Override
15 public void execute(final String argument, final Game game, final View view) {
16
17 if (!argument.isEmpty()) {
18 view.echo(Text.TOO_MANY_ARGUMENTS.toString());
19 return;
20 }
21
22 view.echo(Text.KILL.toString());
23 view.disableInput();
24 view.stopMusic();
25
26 }
27
28}