diff options
Diffstat (limited to 'src/esieequest/controller/commands/QuitCommand.java')
-rw-r--r-- | src/esieequest/controller/commands/QuitCommand.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/esieequest/controller/commands/QuitCommand.java b/src/esieequest/controller/commands/QuitCommand.java new file mode 100644 index 0000000..739bf93 --- /dev/null +++ b/src/esieequest/controller/commands/QuitCommand.java | |||
@@ -0,0 +1,22 @@ | |||
1 | package esieequest.controller.commands; | ||
2 | |||
3 | import esieequest.model.Game; | ||
4 | import esieequest.model.Text; | ||
5 | import esieequest.view.View; | ||
6 | |||
7 | /** | ||
8 | * Allows the user to quit the game. | ||
9 | * | ||
10 | * @author Pacien TRAN-GIRARD | ||
11 | */ | ||
12 | public class QuitCommand implements CommandInterface { | ||
13 | |||
14 | @Override | ||
15 | public void execute(final String argument, final Game game, final View view) { | ||
16 | |||
17 | view.echo(Text.QUIT.getText()); | ||
18 | view.disable(); | ||
19 | |||
20 | } | ||
21 | |||
22 | } | ||