diff options
Diffstat (limited to 'src/esieequest/controller/commands/ToggleSoundCommand.java')
-rw-r--r-- | src/esieequest/controller/commands/ToggleSoundCommand.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/esieequest/controller/commands/ToggleSoundCommand.java b/src/esieequest/controller/commands/ToggleSoundCommand.java index 0d8a62b..4cf0f7d 100644 --- a/src/esieequest/controller/commands/ToggleSoundCommand.java +++ b/src/esieequest/controller/commands/ToggleSoundCommand.java | |||
@@ -1,6 +1,7 @@ | |||
1 | package esieequest.controller.commands; | 1 | package esieequest.controller.commands; |
2 | 2 | ||
3 | import esieequest.model.Game; | 3 | import esieequest.model.Game; |
4 | import esieequest.model.Text; | ||
4 | import esieequest.view.Viewable; | 5 | import esieequest.view.Viewable; |
5 | 6 | ||
6 | /** | 7 | /** |
@@ -13,6 +14,11 @@ public class ToggleSoundCommand implements Executable { | |||
13 | @Override | 14 | @Override |
14 | public void execute(final String argument, final Game game, final Viewable view) { | 15 | public void execute(final String argument, final Game game, final Viewable view) { |
15 | 16 | ||
17 | if (!argument.isEmpty()) { | ||
18 | view.echo(Text.TOO_MANY_ARGUMENTS.toString()); | ||
19 | return; | ||
20 | } | ||
21 | |||
16 | view.toggleSound(); | 22 | view.toggleSound(); |
17 | 23 | ||
18 | } | 24 | } |