diff options
author | Pacien TRAN-GIRARD | 2014-05-05 20:25:53 +0000 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-05-05 20:25:53 +0000 |
commit | c67f1d95464d1d6c2854c59a920a2b3ea975df0f (patch) | |
tree | bf84b623ddec71edfbfc68f16d5530a3e11f7155 /src | |
parent | 0a87883db4d8e1728c1f520deda15e6e79ff1f01 (diff) | |
parent | b8cafdd1c70b3fbb455ee6821c3dd0e5dc587188 (diff) | |
download | esieequest-c67f1d95464d1d6c2854c59a920a2b3ea975df0f.tar.gz |
Merge branch 'zuul-awesome' into 'master'
Zuul Awesome
Diffstat (limited to 'src')
75 files changed, 3755 insertions, 548 deletions
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 | 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 |