aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-04-21 23:50:42 +0200
committerPacien TRAN-GIRARD2014-04-21 23:50:42 +0200
commit86f23485879ded7ab37938c67e49c12b9ad67d21 (patch)
treed24791bee3dd8985d1e4eedb167a12b6d4020fbf
parent0a87883db4d8e1728c1f520deda15e6e79ff1f01 (diff)
downloadesieequest-86f23485879ded7ab37938c67e49c12b9ad67d21.tar.gz
Rename interfaces (-able)
-rwxr-xr-xsrc/esieequest/Main.java4
-rw-r--r--src/esieequest/controller/GameEngine.java6
-rw-r--r--src/esieequest/controller/commands/AleaCommand.java6
-rw-r--r--src/esieequest/controller/commands/BackCommand.java6
-rw-r--r--src/esieequest/controller/commands/Command.java8
-rw-r--r--src/esieequest/controller/commands/DoCommand.java6
-rw-r--r--src/esieequest/controller/commands/DropCommand.java6
-rw-r--r--src/esieequest/controller/commands/Executable.java (renamed from src/esieequest/controller/commands/CommandInterface.java)8
-rw-r--r--src/esieequest/controller/commands/ForwardCommand.java6
-rw-r--r--src/esieequest/controller/commands/GoCommand.java6
-rw-r--r--src/esieequest/controller/commands/HelpCommand.java6
-rw-r--r--src/esieequest/controller/commands/InventoryCommand.java6
-rw-r--r--src/esieequest/controller/commands/LoadCommand.java6
-rw-r--r--src/esieequest/controller/commands/LookCommand.java6
-rw-r--r--src/esieequest/controller/commands/NewCommand.java6
-rw-r--r--src/esieequest/controller/commands/QuitCommand.java6
-rw-r--r--src/esieequest/controller/commands/SaveCommand.java6
-rw-r--r--src/esieequest/controller/commands/SoundCommand.java6
-rw-r--r--src/esieequest/controller/commands/TakeCommand.java6
-rw-r--r--src/esieequest/controller/commands/TalkCommand.java6
-rw-r--r--src/esieequest/controller/commands/TurnCommand.java6
-rw-r--r--src/esieequest/controller/commands/UseCommand.java6
-rw-r--r--src/esieequest/model/doors/Door.java4
-rw-r--r--src/esieequest/model/doors/LockedDoor.java4
-rw-r--r--src/esieequest/model/doors/TrapDoor.java4
-rw-r--r--src/esieequest/model/items/Beamer.java4
-rw-r--r--src/esieequest/model/items/Item.java4
-rw-r--r--src/esieequest/view/Viewable.java (renamed from src/esieequest/view/View.java)2
-rw-r--r--src/esieequest/view/app/UserInterface.java4
-rw-r--r--src/esieequest/view/text/TextInterface.java4
-rw-r--r--src/esieequest/view/web/WebInterface.java4
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
8import esieequest.controller.GameEngine; 8import esieequest.controller.GameEngine;
9import esieequest.model.Game; 9import esieequest.model.Game;
10import esieequest.view.View; 10import esieequest.view.Viewable;
11import esieequest.view.app.Applet; 11import esieequest.view.app.Applet;
12import esieequest.view.app.Window; 12import esieequest.view.app.Window;
13import esieequest.view.text.Console; 13import 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;
4import esieequest.model.Game; 4import esieequest.model.Game;
5import esieequest.model.Text; 5import esieequest.model.Text;
6import esieequest.model.characters.MovingCharacter; 6import esieequest.model.characters.MovingCharacter;
7import esieequest.view.View; 7import 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;
15public class GameEngine { 15public 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;
4import esieequest.model.Text; 4import esieequest.model.Text;
5import esieequest.model.doors.TransporterDoor; 5import esieequest.model.doors.TransporterDoor;
6import esieequest.model.map.Room; 6import esieequest.model.map.Room;
7import esieequest.view.View; 7import 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 */
15public class AleaCommand implements CommandInterface { 15public 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 @@
1package esieequest.controller.commands; 1package esieequest.controller.commands;
2 2
3import esieequest.model.Game; 3import esieequest.model.Game;
4import esieequest.view.View; 4import 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 */
11public class BackCommand implements CommandInterface { 11public 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;
6import esieequest.controller.Utils; 6import esieequest.controller.Utils;
7import esieequest.model.Game; 7import esieequest.model.Game;
8import esieequest.model.Text; 8import esieequest.model.Text;
9import esieequest.view.View; 9import 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;
3import esieequest.model.Game; 3import esieequest.model.Game;
4import esieequest.model.Text; 4impo