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