diff options
author | Pacien TRAN-GIRARD | 2014-04-21 23:50:42 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-04-21 23:50:42 +0200 |
commit | 86f23485879ded7ab37938c67e49c12b9ad67d21 (patch) | |
tree | d24791bee3dd8985d1e4eedb167a12b6d4020fbf /src | |
parent | 0a87883db4d8e1728c1f520deda15e6e79ff1f01 (diff) | |
download | esieequest-86f23485879ded7ab37938c67e49c12b9ad67d21.tar.gz |
Rename interfaces (-able)
Diffstat (limited to 'src')
31 files changed, 84 insertions, 84 deletions
diff --git a/src/esieequest/Main.java b/src/esieequest/Main.java index 4759a6e..974a6be 100755 --- a/src/esieequest/Main.java +++ b/src/esieequest/Main.java | |||
@@ -7,7 +7,7 @@ import javax.swing.JApplet; | |||
7 | 7 | ||
8 | import esieequest.controller.GameEngine; | 8 | import esieequest.controller.GameEngine; |
9 | import esieequest.model.Game; | 9 | import esieequest.model.Game; |
10 | import esieequest.view.View; | 10 | import esieequest.view.Viewable; |
11 | import esieequest.view.app.Applet; | 11 | import esieequest.view.app.Applet; |
12 | import esieequest.view.app.Window; | 12 | import esieequest.view.app.Window; |
13 | import esieequest.view.text.Console; | 13 | import esieequest.view.text.Console; |
@@ -48,7 +48,7 @@ public class Main extends JApplet { | |||
48 | public static void main(final String[] args) { | 48 | public static void main(final String[] args) { |
49 | final List<String> arguments = Arrays.asList(args); | 49 | final List<String> arguments = Arrays.asList(args); |
50 | Game game; | 50 | Game game; |
51 | View view; | 51 | Viewable view; |
52 | 52 | ||
53 | if (arguments.contains("--file")) { | 53 | if (arguments.contains("--file")) { |
54 | if (arguments.size() < 2) { | 54 | if (arguments.size() < 2) { |
diff --git a/src/esieequest/controller/GameEngine.java b/src/esieequest/controller/GameEngine.java index df3d34a..fed79d6 100644 --- a/src/esieequest/controller/GameEngine.java +++ b/src/esieequest/controller/GameEngine.java | |||
@@ -4,7 +4,7 @@ import esieequest.controller.commands.Command; | |||
4 | import esieequest.model.Game; | 4 | import esieequest.model.Game; |
5 | import esieequest.model.Text; | 5 | import esieequest.model.Text; |
6 | import esieequest.model.characters.MovingCharacter; | 6 | import esieequest.model.characters.MovingCharacter; |
7 | import esieequest.view.View; | 7 | import esieequest.view.Viewable; |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * The game main controller class. | 10 | * The game main controller class. |
@@ -15,7 +15,7 @@ import esieequest.view.View; | |||
15 | public class GameEngine { | 15 | public class GameEngine { |
16 | 16 | ||
17 | private final Game game; | 17 | private final Game game; |
18 | private final View view; | 18 | private final Viewable view; |
19 | 19 | ||
20 | /** | 20 | /** |
21 | * Instantiates a game engine with the given model and view. | 21 | * Instantiates a game engine with the given model and view. |
@@ -25,7 +25,7 @@ public class GameEngine { | |||
25 | * @param view | 25 | * @param view |
26 | * the view | 26 | * the view |
27 | */ | 27 | */ |
28 | public GameEngine(final Game game, final View view) { | 28 | public GameEngine(final Game game, final Viewable view) { |
29 | this.game = game; | 29 | this.game = game; |
30 | this.view = view; | 30 | this.view = view; |
31 | 31 | ||
diff --git a/src/esieequest/controller/commands/AleaCommand.java b/src/esieequest/controller/commands/AleaCommand.java index 2a5f5c4..33f4deb 100644 --- a/src/esieequest/controller/commands/AleaCommand.java +++ b/src/esieequest/controller/commands/AleaCommand.java | |||
@@ -4,7 +4,7 @@ import esieequest.model.Game; | |||
4 | import esieequest.model.Text; | 4 | import esieequest.model.Text; |
5 | import esieequest.model.doors.TransporterDoor; | 5 | import esieequest.model.doors.TransporterDoor; |
6 | import esieequest.model.map.Room; | 6 | import esieequest.model.map.Room; |
7 | import esieequest.view.View; | 7 | import esieequest.view.Viewable; |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Provides a way to override the random behaviour of TransporterDoor-s for | 10 | * Provides a way to override the random behaviour of TransporterDoor-s for |
@@ -12,10 +12,10 @@ import esieequest.view.View; | |||
12 | * | 12 | * |
13 | * @author Pacien TRAN-GIRARD | 13 | * @author Pacien TRAN-GIRARD |
14 | */ | 14 | */ |
15 | public class AleaCommand implements CommandInterface { | 15 | public class AleaCommand implements Executable { |
16 | 16 | ||
17 | @Override | 17 | @Override |
18 | public void execute(final String argument, final Game game, final View view) { | 18 | public void execute(final String argument, final Game game, final Viewable view) { |
19 | 19 | ||
20 | final String forcedRoomName = argument; | 20 | final String forcedRoomName = argument; |
21 | Room destinationRoom = null; | 21 | Room destinationRoom = null; |
diff --git a/src/esieequest/controller/commands/BackCommand.java b/src/esieequest/controller/commands/BackCommand.java index 8919540..627df59 100644 --- a/src/esieequest/controller/commands/BackCommand.java +++ b/src/esieequest/controller/commands/BackCommand.java | |||
@@ -1,17 +1,17 @@ | |||
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.view.View; | 4 | import esieequest.view.Viewable; |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * Allows the user to go back on his steps and go to his previous location. | 7 | * Allows the user to go back on his steps and go to his previous location. |
8 | * | 8 | * |
9 | * @author Pacien TRAN-GIRARD | 9 | * @author Pacien TRAN-GIRARD |
10 | */ | 10 | */ |
11 | public class BackCommand implements CommandInterface { | 11 | public class BackCommand implements Executable { |
12 | 12 | ||
13 | @Override | 13 | @Override |
14 | public void execute(final String argument, final Game game, final View view) { | 14 | public void execute(final String argument, final Game game, final Viewable view) { |
15 | 15 | ||
16 | game.getPlayer().goToPreviousRoom(); | 16 | game.getPlayer().goToPreviousRoom(); |
17 | view.updateRoom(game.getPlayer().getCurrentRoom()); | 17 | view.updateRoom(game.getPlayer().getCurrentRoom()); |
diff --git a/src/esieequest/controller/commands/Command.java b/src/esieequest/controller/commands/Command.java index 9b032f7..7ab6961 100644 --- a/src/esieequest/controller/commands/Command.java +++ b/src/esieequest/controller/commands/Command.java | |||
@@ -6,7 +6,7 @@ import java.util.List; | |||
6 | import esieequest.controller.Utils; | 6 | import esieequest.controller.Utils; |
7 | import esieequest.model.Game; | 7 | import esieequest.model.Game; |
8 | import esieequest.model.Text; | 8 | import esieequest.model.Text; |
9 | import esieequest.view.View; | 9 | import esieequest.view.Viewable; |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * The Command-s the user can use. | 12 | * The Command-s the user can use. |
@@ -47,7 +47,7 @@ public enum Command { | |||
47 | 47 | ||
48 | // @formatter:on | 48 | // @formatter:on |
49 | 49 | ||
50 | private CommandInterface command; | 50 | private Executable command; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Links an enum constant to a CommandInterface. | 53 | * Links an enum constant to a CommandInterface. |
@@ -55,7 +55,7 @@ public enum Command { | |||
55 | * @param command | 55 | * @param command |
56 | * the CommandInterface | 56 | * the CommandInterface |
57 | */ | 57 | */ |
58 | Command(final CommandInterface command) { | 58 | Command(final Executable command) { |
59 | this.command = command; | 59 | this.command = command; |
60 | } | 60 | } |
61 | 61 | ||
@@ -69,7 +69,7 @@ public enum Command { | |||
69 | * @param view | 69 | * @param view |
70 | * the View | 70 | * the View |
71 | */ | 71 | */ |
72 | public void execute(final String argument, final Game game, final View view) { | 72 | public void execute(final String argument, final Game game, final Viewable view) { |
73 | this.command.execute(argument, game, view); | 73 | this.command.execute(argument, game, view); |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/src/esieequest/controller/commands/DoCommand.java b/src/esieequest/controller/commands/DoCommand.java index e99c67d..219dba9 100644 --- a/src/esieequest/controller/commands/DoCommand.java +++ b/src/esieequest/controller/commands/DoCommand.java | |||
@@ -3,7 +3,7 @@ package esieequest.controller.commands; | |||
3 | import esieequest.model.Game; | 3 | import esieequest.model.Game; |