diff options
-rw-r--r-- | report/document.tex | 4 | ||||
-rw-r--r-- | report/packages.tex | 36 | ||||
-rw-r--r-- | report/progression.tex | 290 | ||||
-rw-r--r-- | report/tools.tex | 16 | ||||
-rw-r--r-- | report/userguide.tex | 14 |
5 files changed, 230 insertions, 130 deletions
diff --git a/report/document.tex b/report/document.tex index 981ecf3..c3ec4d1 100644 --- a/report/document.tex +++ b/report/document.tex | |||
@@ -45,6 +45,10 @@ | |||
45 | 45 | ||
46 | \cleardoublepage | 46 | \cleardoublepage |
47 | 47 | ||
48 | \input{packages} | ||
49 | |||
50 | \cleardoublepage | ||
51 | |||
48 | \input{tools} | 52 | \input{tools} |
49 | 53 | ||
50 | \cleardoublepage | 54 | \cleardoublepage |
diff --git a/report/packages.tex b/report/packages.tex new file mode 100644 index 0000000..dde1d0b --- /dev/null +++ b/report/packages.tex | |||
@@ -0,0 +1,36 @@ | |||
1 | \chapter{External packages} | ||
2 | |||
3 | Some external packages that are not part of the Java Standard Development Kit | ||
4 | were used in this project. | ||
5 | |||
6 | \section{StretchIcon} | ||
7 | |||
8 | StretchIcon enables the resize of the Room illustration according to the | ||
9 | window's size in the rich Swing GUI, keeping a correct ratio. | ||
10 | |||
11 | \section{Guava} | ||
12 | |||
13 | |||
14 | \section{Intrinsic Map} | ||
15 | |||
16 | |||
17 | |||
18 | \section{Google Web Toolkit} | ||
19 | |||
20 | |||
21 | |||
22 | |||
23 | |||
24 | |||
25 | |||
26 | |||
27 | \section{JSON Simple} | ||
28 | |||
29 | JSON Simple was used to implement the save and load functionalities by enabling | ||
30 | the serialisation of the game datas into JSON Objects. | ||
31 | |||
32 | \subsection{rejava.io} | ||
33 | |||
34 | As some packages required by JSON Simple were not compatible with GWT, | ||
35 | the standard Java StringReader and StringWriter classes were partially | ||
36 | rewritten. | ||
diff --git a/report/progression.tex b/report/progression.tex index 0108d2d..cca0477 100644 --- a/report/progression.tex +++ b/report/progression.tex | |||
@@ -1,82 +1,72 @@ | |||
1 | \chapter{Work progression} | 1 | \chapter{Work progression} |
2 | 2 | ||
3 | \section{Zuul bad} | ||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | \section{Zuul better v1} | 3 | \section{Zuul better v1} |
10 | 4 | ||
11 | \subsection{printLocationInfo} | 5 | \subsection{printLocationInfo} |
12 | 6 | ||
13 | This code duplication has been previously avoided with the printRoomInfo() | 7 | e52a34789 - This code duplication has been previously avoided with the |
14 | method. | 8 | printRoomInfo() method. |
15 | It has been renamed to printLocationInfo(), as part of the commit e52a34789, to | 9 | It has been renamed to printLocationInfo() to match the exercise. |
16 | match the exercise. | ||
17 | 10 | ||
18 | \subsection{getExit} | 11 | \subsection{getExit} |
19 | 12 | ||
20 | The exit attributes have been made private and a getter was added in commit | 13 | 53c427ff3 - The exit attributes have been made private and a getter has been |
21 | 53c427ff3. A switch statement has been used instead of multiple if statements. | 14 | added. |
15 | A switch statement has been used instead of multiple if statements. | ||
22 | 16 | ||
23 | \subsection{getExitString} | 17 | \subsection{getExitString} |
24 | 18 | ||
25 | This method has been added as part of commit ca65af2e2. | 19 | ca65af2e2 - This method, which returns a String containing the informations |
20 | about the Room's exits, has been added. | ||
26 | 21 | ||
27 | \subsection{HashMap, setExit} | 22 | \subsection{HashMap, setExit} |
28 | 23 | ||
29 | Room exits are now stored in an HashMap since commit c9d890b9b. The setExits() | 24 | c9d890b9b - Room exits are now stored in an HashMap. The setExits() method has |
30 | method has been replaced by setExit() which takes advantages of the HashMap. | 25 | been replaced by setExit() which takes advantages of the HashMap. |
31 | 26 | ||
32 | \subsection{Vertical direction} | 27 | \subsection{Vertical direction} |
33 | 28 | ||
34 | In commit 4145a5e8c, the getExitString() method has been modified to be able to | 29 | 4145a5e8c - The getExitString() method has been modified to be able to |
35 | print the availability of the new exits, used in the stairwell at wing 3. Due | 30 | print the availability of the new exits, used in the stairwell at wing 3. Due |
36 | to the architecture of these rooms, the side exits that were previously settled | 31 | to the architecture of these rooms, the side exits that were previously settled |
37 | to link them have been kept. | 32 | to link them have been kept. |
38 | 33 | ||
39 | \subsection{keySet ?} | 34 | \subsection{keySet ?} |
40 | 35 | ||
41 | The keySet() method of the class HashMap returns a Set of the keys contained in | 36 | The keySet() method of the class HashMap returns a Set of the keys |
42 | the map. | 37 | associated to values stored in the Map. |
43 | 38 | ||
44 | \subsection{getExitString ?} | 39 | \subsection{getExitString ?} |
45 | 40 | ||
46 | The getExitString() method returns a String listing the room's exits. | 41 | The getExitString() method returns a String listing the Room's exits. |
47 | To achieve that, it iterates through the exits Map's keys, that is a Set of | 42 | To achieve that, it iterates through the exits Map's keys, which is a Set of |
48 | Strings, appending each one to the String that it returns. | 43 | String-s, appending each one to the String that it returns. |
49 | 44 | ||
50 | \subsection{getLongDescription} | 45 | \subsection{getLongDescription} |
51 | 46 | ||
52 | The Room class now uses the previously explained getExitString() method and | 47 | e510b08d0 - The Room class now uses the previously explained getExitString() |
53 | includes the getLongDescription() method that returns the full description of | 48 | method and includes the getLongDescription() method that returns the full description of |
54 | the room since commit e510b08d0. | 49 | the room. |
55 | |||
56 | \subsection{Object diagram} | ||
57 | |||
58 | %TODO | ||
59 | |||
60 | \subsubsection{Changes on execution} | ||
61 | 50 | ||
62 | %TODO | ||
63 | 51 | ||
64 | \section{Zuul with features} | 52 | \section{Zuul with features} |
65 | 53 | ||
66 | \subsection{look} | 54 | \subsection{look} |
67 | 55 | ||
68 | The look command has been added with the commit 698e3cd25. | 56 | 698e3cd25 - The look command, which prints informations about the current Room, |
57 | has been added. | ||
69 | 58 | ||
70 | \subsection{eat} | 59 | \subsection{eat} |
71 | 60 | ||
72 | The eat command has been added with the commit 40b9b4816. | 61 | 40b9b4816 - The eat command, that just prints a special message, has been added. |
73 | 62 | This command has then been deleted later in the development since it was | |
63 | useless in the scenario. | ||
74 | 64 | ||
75 | \section{Zuul better v2} | 65 | \section{Zuul better v2} |
76 | 66 | ||
77 | \subsection{showAll, showCommands} | 67 | \subsection{showAll, showCommands} |
78 | 68 | ||
79 | This modifications are part of the commit 79d33230b. | 69 | 79d33230b - Theses methods have been implemented. |
80 | 70 | ||
81 | \subsection{Adding commands} | 71 | \subsection{Adding commands} |
82 | 72 | ||
@@ -86,50 +76,49 @@ the Game class and its processCommand() method. | |||
86 | 76 | ||
87 | \subsection{getCommandList} | 77 | \subsection{getCommandList} |
88 | 78 | ||
89 | The command list is not printed in the CommandWords class anymore. Instead, this | 79 | 5f1d0ada2 - The command list is not printed in the CommandWords class anymore. |
90 | class returns a String, forwarded by the Parser class, that is then printed in | 80 | Instead, this class returns a String, forwarded by the Parser class, that is |
91 | the Game class, thanks to commit 5f1d0ada2. | 81 | then printed in the Game class. |
92 | 82 | ||
93 | \subsection{Comparison with reference} | 83 | \subsection{Comparison with reference} |
94 | 84 | ||
95 | The printLocationInfo() method, used only twice, has been trimmed by the commit | 85 | 590a932e5 - The printLocationInfo() method, used only twice, has been trimmed |
96 | 590a932e5 and has been replaced by a call to the getLongDescription() method of | 86 | and has been replaced by a call to the getLongDescription() method of the Room |
97 | the Room class. | 87 | class. |
98 | 88 | ||
99 | A missing getter for the Room description has been added as part of the commit | 89 | f84606424 - A missing getter for the Room description has been added. |
100 | f84606424. | ||
101 | 90 | ||
102 | The loop building the command list String has been modified to use an Iterator | 91 | 0c5793abf - The loop building the command list String has been modified to use |
103 | with the commit 0c5793abf. | 92 | an Iterator. |
104 | 93 | ||
105 | \subsection{StringBuilder} | 94 | \subsection{StringBuilder} |
106 | 95 | ||
107 | The command list and the exit list are now created using a StringBuilder since | 96 | ee5ec33aa - The command list and the exit list are now created using a |
108 | commit ee5ec33aa. This avoids the creation of a new String object at each | 97 | StringBuilder. This avoids the creation of a new String object at each |
109 | concatenation, and thus allows better performances. | 98 | concatenation, and thus allows better performances. |
110 | 99 | ||
111 | \subsection{Room objects} | 100 | \subsection{Room objects} |
112 | 101 | ||
113 | Rooms are now stored in an HashMap since commit f64f1ffb0, so they can be | 102 | f64f1ffb0 - Rooms are now stored in an HashMap, so they can be passed to any |
114 | passed to any method in any class. | 103 | method in any class. |
115 | 104 | ||
116 | \section{Zuul with images} | 105 | \section{Zuul with images} |
117 | 106 | ||
118 | \subsection{Game, GameEngine, UserInterface} | 107 | \subsection{Game, GameEngine, UserInterface} |
119 | 108 | ||
120 | The following methods was implemented as part of commit 54e102463. | 109 | 54e102463 - The methods have been implemented. |
121 | 110 | ||
122 | \subsubsection{Game} | 111 | \subsubsection{Game} |
123 | 112 | ||
124 | The constructor of this class instantiates the GameEngine and the UserInterface, | 113 | The constructor of this class instantiates the GameEngine and the UserInterface, |
125 | and set the output of the first to the second. | 114 | and sets the output of the first to the second. |
126 | 115 | ||