aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/wordpress/tipsforjava/swing/StretchIcon.java5
-rwxr-xr-xsrc/esieequest/Main.java17
-rw-r--r--src/esieequest/controller/GameEngine.java32
-rw-r--r--src/esieequest/controller/Input.java17
-rw-r--r--src/esieequest/controller/commands/AleaCommand.java6
-rw-r--r--src/esieequest/controller/commands/BackCommand.java9
-rw-r--r--src/esieequest/controller/commands/Command.java12
-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.java8
-rw-r--r--src/esieequest/controller/commands/HelpCommand.java6
-rw-r--r--src/esieequest/controller/commands/InventoryCommand.java8
-rw-r--r--src/esieequest/controller/commands/LoadCommand.java35
-rw-r--r--src/esieequest/controller/commands/LookCommand.java6
-rw-r--r--src/esieequest/controller/commands/NewCommand.java20
-rw-r--r--src/esieequest/controller/commands/QuitCommand.java6
-rw-r--r--src/esieequest/controller/commands/SaveCommand.java9
-rw-r--r--src/esieequest/controller/commands/SoundCommand.java6
-rw-r--r--src/esieequest/controller/commands/TakeCommand.java8
-rw-r--r--src/esieequest/controller/commands/TalkCommand.java6
-rw-r--r--src/esieequest/controller/commands/TurnCommand.java8
-rw-r--r--src/esieequest/controller/commands/UseCommand.java6
-rw-r--r--src/esieequest/controller/utils/EnumUtils.java159
-rw-r--r--src/esieequest/controller/utils/ListUtils.java (renamed from src/esieequest/controller/Utils.java)4
-rw-r--r--src/esieequest/controller/utils/SerialisableObject.java27
-rw-r--r--src/esieequest/controller/utils/package-info.java5
-rw-r--r--src/esieequest/esieequest.gwt.xml2
-rw-r--r--src/esieequest/model/Game.java111
-rw-r--r--src/esieequest/model/Player.java208
-rw-r--r--src/esieequest/model/Text.java14
-rw-r--r--src/esieequest/model/characters/Character.java81
-rw-r--r--src/esieequest/model/characters/MovingCharacter.java84
-rw-r--r--src/esieequest/model/characters/SimpleCharacter.java47
-rw-r--r--src/esieequest/model/doors/Door.java27
-rw-r--r--src/esieequest/model/doors/LockedDoor.java31
-rw-r--r--src/esieequest/model/doors/TrapDoor.java4
-rw-r--r--src/esieequest/model/items/Beamer.java27
-rw-r--r--src/esieequest/model/items/Item.java85
-rw-r--r--src/esieequest/model/items/KeyCard.java20
-rw-r--r--src/esieequest/model/items/SimpleItem.java78
-rw-r--r--src/esieequest/model/map/Direction.java1
-rw-r--r--src/esieequest/model/map/Room.java69
-rw-r--r--src/esieequest/model/map/Side.java91
-rw-r--r--src/esieequest/view/Viewable.java (renamed from src/esieequest/view/View.java)27
-rw-r--r--src/esieequest/view/app/UserInterface.java45
-rw-r--r--src/esieequest/view/text/TextInterface.java16
-rw-r--r--src/esieequest/view/web/Main.java4
-rw-r--r--src/esieequest/view/web/WebInterface.java20
-rw-r--r--src/esieequest/view/web/WebInterface.ui.xml2
-rw-r--r--src/net/pacien/util/CleanJSONObject.java48
-rw-r--r--src/net/pacien/util/IntrinsicMap.java66
-rw-r--r--src/net/pacien/util/Mappable.java7
-rw-r--r--src/net/pacien/util/pacienutils.gwt.xml3
-rw-r--r--src/net/pacien/util/package-info.java8
-rw-r--r--src/org/json/simple/ItemList.java158
-rw-r--r--src/org/json/simple/JSONArray.java390
-rw-r--r--src/org/json/simple/JSONAware.java14
-rw-r--r--src/org/json/simple/JSONObject.java143
-rw-r--r--src/org/json/simple/JSONStreamAware.java18
-rw-r--r--src/org/json/simple/JSONValue.java317
-rw-r--r--src/org/json/simple/jsonsimple.gwt.xml4
-rw-r--r--src/org/json/simple/parser/ContainerFactory.java26
-rw-r--r--src/org/json/simple/parser/ContentHandler.java110
-rw-r--r--src/org/json/simple/parser/JSONParser.java544
-rw-r--r--src/org/json/simple/parser/ParseException.java92
-rw-r--r--src/org/json/simple/parser/Yylex.java625
-rw-r--r--src/org/json/simple/parser/Yytoken.java60
-rw-r--r--src/rejava/io/Reader.java20
-rw-r--r--src/rejava/io/StringReader.java51
-rw-r--r--src/rejava/io/StringWriter.java29
-rw-r--r--src/rejava/io/Writer.java16
-rw-r--r--src/rejava/io/package-info.java6
-rw-r--r--src/rejava/io/rejavaio.gwt.xml3
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;
31public class StretchIcon extends ImageIcon { 31public 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;
6import javax.swing.JApplet; 6import javax.swing.JApplet;
7 7
8import esieequest.controller.GameEngine; 8import esieequest.controller.GameEngine;
9import esieequest.model.Game; 9import esieequest.view.Viewable;
10import esieequest.view.View;
11import esieequest.view.app.Applet; 10import esieequest.view.app.Applet;
12import esieequest.view.app.Window; 11import esieequest.view.app.Window;
13import esieequest.view.text.Console; 12import 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;
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 Viewable view, final Game game) {
29 this.game = game; 29 this.game = game;
30 this.view = view;