diff options
77 files changed, 3756 insertions, 548 deletions
@@ -6,5 +6,6 @@ | |||
6 | <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/> | 6 | <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/> |
7 | <classpathentry kind="lib" path="lib/guava-16.0.1.jar"/> | 7 | <classpathentry kind="lib" path="lib/guava-16.0.1.jar"/> |
8 | <classpathentry kind="lib" path="lib/guava-gwt-16.0.1.jar"/> | 8 | <classpathentry kind="lib" path="lib/guava-gwt-16.0.1.jar"/> |
9 | <classpathentry kind="lib" path="lib/lombok.jar"/> | ||
9 | <classpathentry kind="output" path="war/WEB-INF/classes"/> | 10 | <classpathentry kind="output" path="war/WEB-INF/classes"/> |
10 | </classpath> | 11 | </classpath> |
diff --git a/lib/lombok.jar b/lib/lombok.jar new file mode 100755 index 0000000..4141433 --- /dev/null +++ b/lib/lombok.jar | |||
Binary files differ | |||
diff --git a/src/com/wordpress/tipsforjava/swing/StretchIcon.java b/src/com/wordpress/tipsforjava/swing/StretchIcon.java index d41bbfe..7c7181f 100644 --- a/src/com/wordpress/tipsforjava/swing/StretchIcon.java +++ b/src/com/wordpress/tipsforjava/swing/StretchIcon.java | |||
@@ -31,6 +31,11 @@ import javax.swing.ImageIcon; | |||
31 | public class StretchIcon extends ImageIcon { | 31 | public class StretchIcon extends ImageIcon { |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * | ||
35 | */ | ||
36 | private static final long serialVersionUID = 6948448082634127156L; | ||
37 | |||
38 | /** | ||
34 | * Determines whether the aspect ratio of the image is maintained. Set to | 39 | * Determines whether the aspect ratio of the image is maintained. Set to |
35 | * <code>false</code> to distort the image to fill the component. | 40 | * <code>false</code> to distort the image to fill the component. |
36 | */ | 41 | */ |
diff --git a/src/esieequest/Main.java b/src/esieequest/Main.java index 4759a6e..f8b013f 100755 --- a/src/esieequest/Main.java +++ b/src/esieequest/Main.java | |||
@@ -6,8 +6,7 @@ import java.util.List; | |||
6 | import javax.swing.JApplet; | 6 | import javax.swing.JApplet; |
7 | 7 | ||
8 | import esieequest.controller.GameEngine; | 8 | import esieequest.controller.GameEngine; |
9 | import esieequest.model.Game; | 9 | import esieequest.view.Viewable; |
10 | import esieequest.view.View; | ||
11 | import esieequest.view.app.Applet; | 10 | import esieequest.view.app.Applet; |
12 | import esieequest.view.app.Window; | 11 | import esieequest.view.app.Window; |
13 | import esieequest.view.text.Console; | 12 | import esieequest.view.text.Console; |
@@ -32,9 +31,8 @@ public class Main extends JApplet { | |||
32 | */ | 31 | */ |
33 | @Override | 32 | @Override |
34 | public void init() { | 33 | public void init() { |
35 | final Game game = new Game(); | ||
36 | final Applet applet = new Applet(this); | 34 | final Applet applet = new Applet(this); |
37 | new GameEngine(game, applet); | 35 | new GameEngine(applet); |
38 | } | 36 | } |
39 | 37 | ||
40 | /** | 38 | /** |
@@ -47,8 +45,7 @@ public class Main extends JApplet { | |||
47 | */ | 45 | */ |
48 | public static void main(final String[] args) { | 46 | public static void main(final String[] args) { |
49 | final List<String> arguments = Arrays.asList(args); | 47 | final List<String> arguments = Arrays.asList(args); |
50 | Game game; | 48 | Viewable view; |
51 | View view; | ||
52 | 49 | ||
53 | if (arguments.contains("--file")) { | 50 | if (arguments.contains("--file")) { |
54 | if (arguments.size() < 2) { | 51 | if (arguments.size() < 2) { |
@@ -62,13 +59,7 @@ public class Main extends JApplet { | |||
62 | view = new Window(); | 59 | view = new Window(); |
63 | } | 60 | } |
64 | 61 | ||
65 | if (arguments.contains("--challenge")) { | 62 | new GameEngine(view); |
66 | game = new Game(50); | ||
67 | } else { | ||
68 | game = new Game(); | ||
69 | } | ||
70 | |||
71 | new GameEngine(game, view); | ||
72 | } | 63 | } |
73 | 64 | ||
74 | } | 65 | } |
diff --git a/src/esieequest/controller/GameEngine.java b/src/esieequest/controller/GameEngine.java index df3d34a..df83384 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 |