aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--report/document.tex4
-rw-r--r--report/packages.tex36
-rw-r--r--report/progression.tex290
-rw-r--r--report/tools.tex16
-rw-r--r--report/userguide.tex14
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
3Some external packages that are not part of the Java Standard Development Kit
4were used in this project.
5
6\section{StretchIcon}
7
8StretchIcon enables the resize of the Room illustration according to the
9window'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
29JSON Simple was used to implement the save and load functionalities by enabling
30the serialisation of the game datas into JSON Objects.
31
32\subsection{rejava.io}
33
34As some packages required by JSON Simple were not compatible with GWT,
35the standard Java StringReader and StringWriter classes were partially
36rewritten.
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
13This code duplication has been previously avoided with the printRoomInfo() 7e52a34789 - This code duplication has been previously avoided with the
14method. 8printRoomInfo() method.
15It has been renamed to printLocationInfo(), as part of the commit e52a34789, to 9It has been renamed to printLocationInfo() to match the exercise.
16match the exercise.
17 10
18\subsection{getExit} 11\subsection{getExit}
19 12
20The exit attributes have been made private and a getter was added in commit 1353c427ff3 - The exit attributes have been made private and a getter has been
2153c427ff3. A switch statement has been used instead of multiple if statements. 14added.
15A switch statement has been used instead of multiple if statements.
22 16
23\subsection{getExitString} 17\subsection{getExitString}
24 18
25This method has been added as part of commit ca65af2e2. 19ca65af2e2 - This method, which returns a String containing the informations
20about the Room's exits, has been added.
26 21
27\subsection{HashMap, setExit} 22\subsection{HashMap, setExit}
28 23
29Room exits are now stored in an HashMap since commit c9d890b9b. The setExits() 24c9d890b9b - Room exits are now stored in an HashMap. The setExits() method has
30method has been replaced by setExit() which takes advantages of the HashMap. 25been replaced by setExit() which takes advantages of the HashMap.
31 26
32\subsection{Vertical direction} 27\subsection{Vertical direction}
33 28
34In commit 4145a5e8c, the getExitString() method has been modified to be able to 294145a5e8c - The getExitString() method has been modified to be able to
35print the availability of the new exits, used in the stairwell at wing 3. Due 30print the availability of the new exits, used in the stairwell at wing 3. Due
36to the architecture of these rooms, the side exits that were previously settled 31to the architecture of these rooms, the side exits that were previously settled
37to link them have been kept. 32to link them have been kept.
38 33
39\subsection{keySet ?} 34\subsection{keySet ?}
40 35
41The keySet() method of the class HashMap returns a Set of the keys contained in 36The keySet() method of the class HashMap returns a Set of the keys
42the map. 37associated to values stored in the Map.
43 38
44\subsection{getExitString ?} 39\subsection{getExitString ?}
45 40
46The getExitString() method returns a String listing the room's exits. 41The getExitString() method returns a String listing the Room's exits.
47To achieve that, it iterates through the exits Map's keys, that is a Set of 42To achieve that, it iterates through the exits Map's keys, which is a Set of
48Strings, appending each one to the String that it returns. 43String-s, appending each one to the String that it returns.
49 44
50\subsection{getLongDescription} 45\subsection{getLongDescription}
51 46
52The Room class now uses the previously explained getExitString() method and 47e510b08d0 - The Room class now uses the previously explained getExitString()
53includes the getLongDescription() method that returns the full description of 48method and includes the getLongDescription() method that returns the full description of
54the room since commit e510b08d0. 49the 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
68The look command has been added with the commit 698e3cd25. 56698e3cd25 - The look command, which prints informations about the current Room,
57has been added.
69 58
70\subsection{eat} 59\subsection{eat}
71 60
72The eat command has been added with the commit 40b9b4816. 6140b9b4816 - The eat command, that just prints a special message, has been added.
73 62This command has then been deleted later in the development since it was
63useless 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
79This modifications are part of the commit 79d33230b. 6979d33230b - 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
89The command list is not printed in the CommandWords class anymore. Instead, this 795f1d0ada2 - The command list is not printed in the CommandWords class anymore.
90class returns a String, forwarded by the Parser class, that is then printed in 80Instead, this class returns a String, forwarded by the Parser class, that is
91the Game class, thanks to commit 5f1d0ada2. 81then printed in the Game class.
92 82
93\subsection{Comparison with reference} 83\subsection{Comparison with reference}
94 84
95The printLocationInfo() method, used only twice, has been trimmed by the commit 85590a932e5 - The printLocationInfo() method, used only twice, has been trimmed
96590a932e5 and has been replaced by a call to the getLongDescription() method of 86and has been replaced by a call to the getLongDescription() method of the Room
97the Room class. 87class.
98 88
99A missing getter for the Room description has been added as part of the commit 89f84606424 - A missing getter for the Room description has been added.
100f84606424.
101 90
102The loop building the command list String has been modified to use an Iterator 910c5793abf - The loop building the command list String has been modified to use
103with the commit 0c5793abf. 92an Iterator.
104 93
105\subsection{StringBuilder} 94\subsection{StringBuilder}
106 95
107The command list and the exit list are now created using a StringBuilder since 96ee5ec33aa - The command list and the exit list are now created using a
108commit ee5ec33aa. This avoids the creation of a new String object at each 97StringBuilder. This avoids the creation of a new String object at each
109concatenation, and thus allows better performances. 98concatenation, and thus allows better performances.
110 99
111\subsection{Room objects} 100\subsection{Room objects}
112 101
113Rooms are now stored in an HashMap since commit f64f1ffb0, so they can be 102f64f1ffb0 - Rooms are now stored in an HashMap, so they can be passed to any
114passed to any method in any class. 103method 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
120The following methods was implemented as part of commit 54e102463. 10954e102463 - The methods have been implemented.
121 110
122\subsubsection{Game} 111\subsubsection{Game}
123 112
124The constructor of this class instantiates the GameEngine and the UserInterface, 113The constructor of this class instantiates the GameEngine and the UserInterface,
125and set the output of the first to the second. 114and sets the output of the first to the second.
126 115