diff options
author | Pacien TRAN-GIRARD | 2014-04-17 10:07:19 +0000 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-04-17 10:07:19 +0000 |
commit | 006daa5c112fd9a5e3bdc38d760ba22b2558651c (patch) | |
tree | 638d75e1dd07e29df248143960794265041bbae0 | |
parent | 12acc853fff55c463f10509e5e79fee72cd9127e (diff) | |
parent | abc30b45754e82c00d7c06ff83c74dff9401da11 (diff) | |
download | esieequest-006daa5c112fd9a5e3bdc38d760ba22b2558651c.tar.gz |
Merge branch 'zuul-extended' into 'master'
Zuul Extended
25 files changed, 820 insertions, 116 deletions
diff --git a/report/progression.tex b/report/progression.tex index ccfff83..1a74d8d 100644 --- a/report/progression.tex +++ b/report/progression.tex | |||
@@ -55,8 +55,11 @@ the room since commit e510b08d0. | |||
55 | 55 | ||
56 | \subsection{Object diagram} | 56 | \subsection{Object diagram} |
57 | 57 | ||
58 | %TODO | ||
59 | |||
58 | \subsubsection{Changes on execution} | 60 | \subsubsection{Changes on execution} |
59 | 61 | ||
62 | %TODO | ||
60 | 63 | ||
61 | \section{Zuul with features} | 64 | \section{Zuul with features} |
62 | 65 | ||
@@ -327,32 +330,64 @@ with the commit number 159b168b2. | |||
327 | 330 | ||
328 | \subsection{Time limit} | 331 | \subsection{Time limit} |
329 | 332 | ||
330 | \subsubsection{Real time} | 333 | The time limit was implemented as a steps limit for the player. When this limit |
334 | is reached, the game quits with a message. The argument --challenge is necessary | ||
335 | to enable this game mode. Commit number 2fee72805. | ||
331 | 336 | ||
332 | \subsection{GUI} | 337 | \subsection{GUI} |
333 | 338 | ||
339 | The actuel GUI will be improved at the end of the project, when all new | ||
340 | functionnalities will be implemented. | ||
341 | |||
334 | \subsection{Trap door} | 342 | \subsection{Trap door} |
335 | 343 | ||
344 | A TrapDoor was added to link the main map to the off-script map, and all Rooms | ||
345 | are linked through Doors since the commit number 6e388ec78. When crossing a | ||
346 | TrapDoor, the Performer clears the Player's previous Rooms Stack. | ||
347 | |||
336 | \subsection{Beamer} | 348 | \subsection{Beamer} |
337 | 349 | ||
350 | A Beamer was added with the commit number 6a154d2fe. It can be used once picked | ||
351 | up via the ``use'' command. It alternatively memorises the player's current room | ||
352 | and teleports him back. | ||
353 | |||
338 | \subsection{Locked door} | 354 | \subsection{Locked door} |
339 | 355 | ||
356 | A locked door was implement with the commit number e9c61548b. To pass through, | ||
357 | the player needs to pick up a corresponding key. | ||
358 | |||
340 | \subsection{Tests} | 359 | \subsection{Tests} |
341 | 360 | ||
361 | The test files were updated to fit the last modifications. | ||
362 | |||
342 | \subsection{Transporter room} | 363 | \subsection{Transporter room} |
343 | 364 | ||
365 | The transporter was implemented as a sub-type of Door instead of Room, since the | ||
366 | Player has to be transported when he crosses the Door. This is part of the | ||
367 | commit number c5a766345. | ||
368 | |||
344 | \subsubsection{alea} | 369 | \subsubsection{alea} |
345 | 370 | ||
371 | c99590be11 - An alea overriding command for the random TransporterDoor was | ||
372 | implemented. It is now possible to force the destination room with this command. | ||
373 | |||
374 | \subsection{Character} | ||
375 | |||
376 | 3e7f68425 - Characters that can talk were added. | ||
377 | |||
378 | \subsubsection{Moving character} | ||
379 | |||
380 | Moving characters that can move to adjacent rooms once permitted were added. | ||
381 | |||
382 | |||
383 | \section{Zuul even better} | ||
384 | |||
346 | \subsection{Inheritance} | 385 | \subsection{Inheritance} |
347 | 386 | ||
348 | \subsection{Abstract Command} | 387 | \subsection{Abstract Command} |
349 | 388 | ||
350 | \subsection{Packages} | 389 | \subsection{Packages} |
351 | 390 | ||
352 | \subsection{Character} | ||
353 | |||
354 | \subsubsection{Moving character} | ||
355 | |||
356 | 391 | ||
357 | \section{Zuul without BlueJ} | 392 | \section{Zuul without BlueJ} |
358 | 393 | ||
@@ -365,6 +400,15 @@ with the commit number 159b168b2. | |||
365 | 400 | ||
366 | \section{Zuul awesome} | 401 | \section{Zuul awesome} |
367 | 402 | ||
403 | \subsection{Non-droppable items} | ||
404 | |||
405 | Non-droppable items were added with the commit number ef51d5137. | ||
406 | |||
407 | \subsection{Hidden doors} | ||
408 | |||
409 | Hidden Doors that are not shown as exits were added with the commit number | ||
410 | 20c9b8b28. | ||
411 | |||
368 | \subsection{Room sides} | 412 | \subsection{Room sides} |
369 | 413 | ||
370 | \subsection{Quests} | 414 | \subsection{Quests} |
diff --git a/src/esieequest/Main.java b/src/esieequest/Main.java index 59ac568..362af9c 100755 --- a/src/esieequest/Main.java +++ b/src/esieequest/Main.java | |||
@@ -62,6 +62,10 @@ public class Main extends JApplet { | |||
62 | view = new Window(); | 62 | view = new Window(); |
63 | } | 63 | } |
64 | 64 | ||
65 | if (arguments.contains("--challenge")) { | ||
66 | game.getPlayer().setMaxNbSteps(50); | ||
67 | } | ||
68 | |||
65 | new GameEngine(game, view); | 69 | new GameEngine(game, view); |
66 | } | 70 | } |
67 | 71 | ||
diff --git a/src/esieequest/controller/Interpreter.java b/src/esieequest/controller/Interpreter.java index 32adeda..1895099 100644 --- a/src/esieequest/controller/Interpreter.java +++ b/src/esieequest/controller/Interpreter.java | |||
@@ -48,6 +48,8 @@ class Interpreter { | |||
48 | public void dispatch(final Command command) { | 48 | public void dispatch(final Command command) { |
49 | if (command.getAction() != null) { | 49 | if (command.getAction() != null) { |
50 | switch (command.getAction()) { | 50 | switch (command.getAction()) { |
51 | |||
52 | // game related: | ||
51 | case NEW: | 53 | case NEW: |
52 | this.performer.newGame(); | 54 | this.performer.newGame(); |
53 | return; | 55 | return; |
@@ -57,9 +59,17 @@ class Interpreter { | |||
57 | case SAVE: | 59 | case SAVE: |
58 | this.performer.saveGame(); | 60 | this.performer.saveGame(); |
59 | return; | 61 | return; |
62 | case QUIT: | ||
63 | this.performer.quitGame(); | ||
64 | return; | ||
60 | case SOUND: | 65 | case SOUND: |
61 | this.performer.toggleSound(); | 66 | this.performer.toggleSound(); |
62 | return; | 67 | return; |
68 | case HELP: | ||
69 | this.performer.showHelp(); | ||
70 | return; | ||
71 | |||
72 | // map related: | ||
63 | case GO: | 73 | case GO: |
64 | this.performer.goTo(command.getOption()); | 74 | this.performer.goTo(command.getOption()); |
65 | return; | 75 | return; |
@@ -69,25 +79,32 @@ class Interpreter { | |||
69 | case LOOK: | 79 | case LOOK: |
70 | this.performer.look(); | 80 | this.performer.look(); |
71 | return; | 81 | return; |
82 | case ALEA: | ||
83 | this.performer.forceAlea(command.getOption()); | ||
84 | return; | ||
85 | |||
86 | // items related: | ||
72 | case INVENTORY: | 87 | case INVENTORY: |
73 | this.performer.listItems(); | 88 | this.performer.listItems(); |
74 | return; | 89 | return; |
75 | case TAKE: | 90 | case TAKE: |
76 | this.performer.take(command.getOption()); | 91 | this.performer.takeItem(command.getOption()); |
77 | return; | 92 | return; |
78 | case DROP: | 93 | case DROP: |
79 | this.performer.drop(command.getOption()); | 94 | this.performer.dropItem(command.getOption()); |
80 | return; | 95 | return; |
81 | case HELP: | 96 | case USE: |
82 | this.performer.showHelp(); | 97 |