aboutsummaryrefslogtreecommitdiff
path: root/report/progression.tex
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-06-05 00:40:36 +0200
committerPacien TRAN-GIRARD2014-06-05 00:40:36 +0200
commitcf9be831cf6fac6dedb9e7e9216d57fb0f4a642e (patch)
tree4da6e7c1df18d380cb8ced6fcc8a67f0c0112f2a /report/progression.tex
parent1ba6c5935bf395cb74dd6d0fe805152f0fb96f8c (diff)
downloadesieequest-cf9be831cf6fac6dedb9e7e9216d57fb0f4a642e.tar.gz
Update report
Diffstat (limited to 'report/progression.tex')
-rw-r--r--report/progression.tex255
1 files changed, 130 insertions, 125 deletions
diff --git a/report/progression.tex b/report/progression.tex
index cca0477..cd3f4ec 100644
--- a/report/progression.tex
+++ b/report/progression.tex
@@ -4,48 +4,48 @@
4 4
5\subsection{printLocationInfo} 5\subsection{printLocationInfo}
6 6
7e52a34789 - This code duplication has been previously avoided with the 7e52a34789 - Pacien - This code duplication has been previously avoided with the
8printRoomInfo() method. 8printRoomInfo() method.
9It has been renamed to printLocationInfo() to match the exercise. 9It has been renamed to printLocationInfo() to match the exercise.
10 10
11\subsection{getExit} 11\subsection{getExit}
12 12
1353c427ff3 - The exit attributes have been made private and a getter has been 1353c427ff3 - Pacien - The exit attributes have been made private and a getter has
14added. 14been added.
15A switch statement has been used instead of multiple if statements. 15A switch statement has been used instead of multiple if statements.
16 16
17\subsection{getExitString} 17\subsection{getExitString}
18 18
19ca65af2e2 - This method, which returns a String containing the informations 19ca65af2e2 - Pacien - This method, which returns a String containing the
20about the Room's exits, has been added. 20informations about the Room's exits, has been added.
21 21
22\subsection{HashMap, setExit} 22\subsection{HashMap, setExit}
23 23
24c9d890b9b - Room exits are now stored in an HashMap. The setExits() method has 24c9d890b9b - Pacien - Room exits are now stored in an HashMap. The setExits()
25been replaced by setExit() which takes advantages of the HashMap. 25method has been replaced by setExit() which takes advantages of the HashMap.
26 26
27\subsection{Vertical direction} 27\subsection{Vertical direction}
28 28
294145a5e8c - The getExitString() method has been modified to be able to 294145a5e8c - Pacien - The getExitString() method has been modified to be able to
30print 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
31to 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
32to link them have been kept. 32to link them have been kept.
33 33
34\subsection{keySet ?} 34\subsection{keySet ?}
35 35
36The keySet() method of the class HashMap returns a Set of the keys 36Benoît - The keySet() method of the class HashMap returns a Set of the keys
37associated to values stored in the Map. 37associated to values stored in the Map.
38 38
39\subsection{getExitString ?} 39\subsection{getExitString ?}
40 40
41The getExitString() method returns a String listing the Room's exits. 41Benoît - The getExitString() method returns a String listing the Room's exits.
42To achieve that, it iterates through the exits Map's keys, which is a Set of 42To achieve that, it iterates through the exits Map's keys, which is a Set of
43String-s, appending each one to the String that it returns. 43String-s, appending each one to the String that it returns.
44 44
45\subsection{getLongDescription} 45\subsection{getLongDescription}
46 46
47e510b08d0 - The Room class now uses the previously explained getExitString() 47e510b08d0 - Pacien - The Room class now uses the previously explained
48method and includes the getLongDescription() method that returns the full description of 48getExitString() method and includes the getLongDescription() method that returns the full description of
49the room. 49the room.
50 50
51 51
@@ -53,12 +53,13 @@ the room.
53 53
54\subsection{look} 54\subsection{look}
55 55
56698e3cd25 - The look command, which prints informations about the current Room, 56698e3cd25 - Benoît - The look command, which prints informations about the
57has been added. 57current Room, has been added.
58 58
59\subsection{eat} 59\subsection{eat}
60 60
6140b9b4816 - The eat command, that just prints a special message, has been added. 6140b9b4816 - Benoît - The eat command, that just prints a special message, has
62been added.
62This command has then been deleted later in the development since it was 63This command has then been deleted later in the development since it was
63useless in the scenario. 64useless in the scenario.
64 65
@@ -66,77 +67,79 @@ useless in the scenario.
66 67
67\subsection{showAll, showCommands} 68\subsection{showAll, showCommands}
68 69
6979d33230b - Theses methods have been implemented. 7079d33230b - Pacien - Theses methods have been implemented.
70 71
71\subsection{Adding commands} 72\subsection{Adding commands}
72 73
73Adding new commands would not require modifying the printHelp() method anymore. 74Benoît - Adding new commands would not require modifying the printHelp() method
75anymore.
74However, adding new commands and related functions would still require editing 76However, adding new commands and related functions would still require editing
75the Game class and its processCommand() method. 77the Game class and its processCommand() method.
76 78
77\subsection{getCommandList} 79\subsection{getCommandList}
78 80
795f1d0ada2 - The command list is not printed in the CommandWords class anymore. 815f1d0ada2 - Benoît - The command list is not printed in the CommandWords class
82anymore.
80Instead, this class returns a String, forwarded by the Parser class, that is 83Instead, this class returns a String, forwarded by the Parser class, that is
81then printed in the Game class. 84then printed in the Game class.
82 85
83\subsection{Comparison with reference} 86\subsection{Comparison with reference}
84 87
85590a932e5 - The printLocationInfo() method, used only twice, has been trimmed 88590a932e5 - Pacien - The printLocationInfo() method, used only twice, has been
86and has been replaced by a call to the getLongDescription() method of the Room 89trimmed and has been replaced by a call to the getLongDescription() method of the Room
87class. 90class.
88 91
89f84606424 - A missing getter for the Room description has been added. 92f84606424 - Benoît - A missing getter for the Room description has been added.
90 93
910c5793abf - The loop building the command list String has been modified to use 940c5793abf - Benoît - The loop building the command list String has been modified
92an Iterator. 95to use an Iterator.
93 96
94\subsection{StringBuilder} 97\subsection{StringBuilder}
95 98
96ee5ec33aa - The command list and the exit list are now created using a 99ee5ec33aa - Benoît - The command list and the exit list are now created using a
97StringBuilder. This avoids the creation of a new String object at each 100StringBuilder. This avoids the creation of a new String object at each
98concatenation, and thus allows better performances. 101concatenation, and thus allows better performances.
99 102
100\subsection{Room objects} 103\subsection{Room objects}
101 104
102f64f1ffb0 - Rooms are now stored in an HashMap, so they can be passed to any 105f64f1ffb0 - Pacien - Rooms are now stored in an HashMap, so they can be passed
103method in any class. 106to any method in any class.
104 107
105\section{Zuul with images} 108\section{Zuul with images}
106 109
107\subsection{Game, GameEngine, UserInterface} 110\subsection{Game, GameEngine, UserInterface}
108 111
10954e102463 - The methods have been implemented. 11254e102463 - Pacien - The methods have been implemented.
110 113
111\subsubsection{Game} 114\subsubsection{Game}
112 115
113The constructor of this class instantiates the GameEngine and the UserInterface, 116Pacien - The constructor of this class instantiates the GameEngine and the
114and sets the output of the first to the second. 117UserInterface, and sets the output of the first to the second.
115 118
116\subsubsection{GameEngine} 119\subsubsection{GameEngine}
117 120
118This class contains the attributes and methods previously contained in the Game 121Pacien - This class contains the attributes and methods previously contained in
119class. 122the Game class.
120 123
121Instead of printing to the standard console output, it prints to the Swing GUI. 124Instead of printing to the standard console output, it prints to the Swing GUI.
122 125
123\subsubsection{UserInterface} 126\subsubsection{UserInterface}
124 127
125This class implements the graphical user interface of the game. It basically 128Pacien - This class implements the graphical user interface of the game. It
126creates the different window components and provides methods to 129basically creates the different window components and provides methods to
127interact with them. 130interact with them.
128 131
129\subsection{Parser/Scanner} 132\subsection{Parser/Scanner}
130 133
131Since commands are entered through a text field instead of the console, the 134Pacien - Since commands are entered through a text field instead of the console,
132use of Scanner that read from the standard system input is not required for the 135the use of Scanner that read from the standard system input is not required for the
133Swing GUI. 136Swing GUI.
134 137
135 138
136\subsection{addActionListener() and actionPerformed()} 139\subsection{addActionListener() and actionPerformed()}
137 140
138The addActionListener() of an object x takes as parameter an object y that have 141Pacien - The addActionListener() of an object x takes as parameter an object y
139a actionPerformed() method. When an action event occurs on x, this method on y 142that have a actionPerformed() method. When an action event occurs on x, this method on y
140is called and an ActionEvent is passed as parameter. 143is called and an ActionEvent is passed as parameter.
141 144
142The actionPerformed() method then does the appropriate action according to the 145The actionPerformed() method then does the appropriate action according to the
@@ -144,8 +147,8 @@ event that happened.
144 147
145\subsection{Add a button} 148\subsection{Add a button}
146 149
1477f153a4c1 - A help button has been added. The processCommand() method has been 1507f153a4c1 - Benoît - A help button has been added. The processCommand() method
148modified to take the command String as a parameter instead of reading it only 151has been modified to take the command String as a parameter instead of reading it only
149from the text field, and the actionPerformed() method has been modified 152from the text field, and the actionPerformed() method has been modified
150accordingly to forward the command. 153accordingly to forward the command.
151 154
@@ -154,8 +157,8 @@ accordingly to forward the command.
154 157
155\subsection{Structure} 158\subsection{Structure}
156 159
157Three packages were made to help matching this architecture: model, view and 160Pacien - Three packages were made to help matching this architecture: model,
158controller.