diff options
-rw-r--r-- | report/progression.tex | 5 | ||||
-rw-r--r-- | report/userguide.tex | 13 | ||||
-rw-r--r-- | src/esieequest/game/items/Inventory.java | 4 | ||||
-rw-r--r-- | src/esieequest/ui/rich/app/AppInterface.java | 3 | ||||
-rw-r--r-- | src/esieequest/ui/rich/app/Layout.java | 30 |
5 files changed, 22 insertions, 33 deletions
diff --git a/report/progression.tex b/report/progression.tex index cd3f4ec..1e6948a 100644 --- a/report/progression.tex +++ b/report/progression.tex | |||
@@ -405,7 +405,10 @@ Item-s, and View-s since the beginning of the project. | |||
405 | 405 | ||
406 | \subsection{Abstract Command} | 406 | \subsection{Abstract Command} |
407 | 407 | ||
408 | Pacien - The Performer class was replaced by multiple Command sub-types. | 408 | Pacien - The Performer class was replaced by multiple Command sub-types. Instead |
409 | of using an AbstractCommand class, an interface (Executable) was created, and | ||
410 | the command arguments passed by parameter instead of being stored in a field. | ||
411 | This makes more sense than instantiating a Command each time it is executed. | ||
409 | 412 | ||
410 | \subsection{Packages} | 413 | \subsection{Packages} |
411 | 414 | ||
diff --git a/report/userguide.tex b/report/userguide.tex index c607d4d..0f90e70 100644 --- a/report/userguide.tex +++ b/report/userguide.tex | |||
@@ -71,3 +71,16 @@ file. | |||
71 | turn & <left|right> & Turn in the given direction.\\ | 71 | turn & <left|right> & Turn in the given direction.\\ |
72 | use & <item> & Use an item.\\ | 72 | use & <item> & Use an item.\\ |
73 | \end{tabular} | 73 | \end{tabular} |
74 | |||
75 | \section{Keyboard shortcuts} | ||
76 | |||
77 | \begin{tabular}{ l | l } | ||
78 | Key & Action\\ | ||
79 | \hline | ||
80 | Left arrow & Turn left\\ | ||
81 | Right arrow & Turn right\\ | ||
82 | Up arrow & Go forward\\ | ||
83 | Down arrow & Go back\\ | ||
84 | PgUp & Take/Talk\\ | ||
85 | Home & Open/Close the inventory\\ | ||
86 | \end{tabular} \ No newline at end of file | ||
diff --git a/src/esieequest/game/items/Inventory.java b/src/esieequest/game/items/Inventory.java index 6bbda23..04f5a0b 100644 --- a/src/esieequest/game/items/Inventory.java +++ b/src/esieequest/game/items/Inventory.java | |||
@@ -150,9 +150,7 @@ public class Inventory implements SerialisableList { | |||
150 | * @return the Item | 150 | * @return the Item |
151 | */ | 151 | */ |
152 | public Item takeItem(final String itemName) { | 152 | public Item takeItem(final String itemName) { |
153 | final Item item = this.getItem(itemName); | 153 | return this.items.remove(itemName); |
154 | this.removeItem(item); | ||
155 | return item; | ||
156 | } | 154 | } |
157 | 155 | ||
158 | /** | 156 | /** |
diff --git a/src/esieequest/ui/rich/app/AppInterface.java b/src/esieequest/ui/rich/app/AppInterface.java index 79a51cf..502dd71 100644 --- a/src/esieequest/ui/rich/app/AppInterface.java +++ b/src/esieequest/ui/rich/app/AppInterface.java | |||
@@ -82,8 +82,7 @@ abstract class AppInterface extends RichInterface implements ActionListener { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Placeholder image generation from | 85 | * Generates a placeholder image. |
86 | * http://stackoverflow.com/a/17802477/1348634 | ||
87 | * | 86 | * |
88 | * @param text | 87 | * @param text |
89 | * the image text | 88 | * the image text |
diff --git a/src/esieequest/ui/rich/app/Layout.java b/src/esieequest/ui/rich/app/Layout.java index 316c0a5..34c5596 100644 --- a/src/esieequest/ui/rich/app/Layout.java +++ b/src/esieequest/ui/rich/app/Layout.java | |||
@@ -22,6 +22,7 @@ import javax.swing.JTextPane; | |||
22 | import javax.swing.KeyStroke; | 22 | import javax.swing.KeyStroke; |
23 | import javax.swing.border.EmptyBorder; | 23 | import javax.swing.border.EmptyBorder; |
24 | 24 | ||
25 | import lombok.AccessLevel; | ||
25 | import lombok.Getter; | 26 | import lombok.Getter; |
26 | import esieequest.engine.commands.Command; | 27 | import esieequest.engine.commands.Command; |
27 | import esieequest.game.Text; | 28 | import esieequest.game.Text; |
@@ -32,73 +33,48 @@ import esieequest.game.map.Orientation; | |||
32 | * | 33 | * |
33 | * @author Pacien TRAN-GIRARD | 34 | * @author Pacien TRAN-GIRARD |
34 | */ | 35 | */ |
36 | @Getter | ||
35 | public class Layout { | 37 | public class Layout { |
36 | 38 | ||
39 | @Getter(AccessLevel.NONE) | ||
37 | private final AppInterface appInterface; | 40 | private final AppInterface appInterface; |
38 | 41 | ||
39 | @Getter | ||
40 | private JPanel mainPanel; | 42 | private JPanel mainPanel; |
41 | 43 | ||
42 | @Getter | ||
43 | private JTextPane questTextPane; | 44 | private JTextPane questTextPane; |
44 | 45 | ||
45 | @Getter | ||
46 | private JLabel imageLabel; | 46 | private JLabel imageLabel; |
47 | 47 | ||
48 | @Getter | ||
49 | private JPanel menuPanel; | 48 | private JPanel menuPanel; |
50 | @Getter | ||
51 | private JPanel questPanel; | 49 | private JPanel questPanel; |
52 | @Getter | ||
53 | private JPanel gamePanel; | 50 | private JPanel gamePanel; |
54 | 51 | ||
55 | @Getter | ||
56 | private JButton newButton; | 52 | private JButton newButton; |
57 | @Getter | ||
58 | private JButton soundButton; | 53 | private JButton soundButton; |
59 | @Getter | ||
60 | private JPanel filePanel; | 54 | private JPanel filePanel; |
61 | @Getter | ||
62 | private JButton loadButton; | 55 | private JButton loadButton; |
63 | @Getter | ||
64 | private JButton saveButton; | 56 | private JButton saveButton; |
65 | 57 | ||
66 | @Getter | ||
67 | private JPanel imagePanel; | 58 | private JPanel imagePanel; |
68 | 59 | ||
69 | @Getter | ||
70 | private JPanel userPanel; | 60 | private JPanel userPanel; |
71 | @Getter | ||
72 | private JPanel dispPanel; | 61 | private JPanel dispPanel; |
73 | 62 | ||
74 | @Getter | ||
75 | private JPanel consolePanel; | 63 | private JPanel consolePanel; |
76 | @Getter | ||
77 | private JPanel inventoryPanel; | 64 | private JPanel inventoryPanel; |
78 | 65 | ||
79 | @Getter | ||
80 | private JPanel controlPanel; | 66 | private JPanel controlPanel; |
81 | @Getter | ||
82 | private JPanel topControlPanel; | 67 | private JPanel topControlPanel; |
83 | @Getter | ||
84 | private JPanel bottomControlPanel; | 68 | private JPanel bottomControlPanel; |
85 | 69 | ||
86 | @Getter | ||
87 | private JTextPane infoTextPane; | 70 | private JTextPane infoTextPane; |
88 | @Getter | ||
89 | private JTextField inputField; | 71 | private JTextField inputField; |
90 | 72 | ||
91 | @Getter | ||
92 | private JButton forwardButton; | 73 | private JButton forwardButton; |
93 | @Getter | ||
94 | private JButton inventoryButton; | 74 | private JButton inventoryButton; |
95 | @Getter | ||
96 | private JButton actionButton; | 75 | private JButton actionButton; |
97 | @Getter | ||
98 | private JButton backButton; | 76 | private JButton backButton; |
99 | @Getter | ||
100 | private JButton leftButton; | 77 | private JButton leftButton; |
101 | @Getter | ||
102 | private JButton rightButton; | 78 | private JButton rightButton; |
103 | 79 | ||
104 | /** | 80 | /** |