aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/esieequest/CommandWords.java8
-rw-r--r--src/esieequest/Room.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/esieequest/CommandWords.java b/src/esieequest/CommandWords.java
index c942043..e2d50f5 100644
--- a/src/esieequest/CommandWords.java
+++ b/src/esieequest/CommandWords.java
@@ -36,10 +36,10 @@ public class CommandWords {
36 * Print all valid commands to System.out. 36 * Print all valid commands to System.out.
37 */ 37 */
38 public String getCommandList() { 38 public String getCommandList() {
39 String vCommands = ""; 39 StringBuilder vStrBuilder = new StringBuilder();
40 for (String vCommand : this.sValidCommands) { 40 for (String vCommand : sValidCommands) {
41 vCommands += " " + vCommand; 41 vStrBuilder.append(" ").append(vCommand);
42 } 42 }
43 return vCommands; 43 return vStrBuilder.toString();
44 } 44 }
45} 45}
diff --git a/src/esieequest/Room.java b/src/esieequest/Room.java
index 4626490..6d05b58 100644
--- a/src/esieequest/Room.java
+++ b/src/esieequest/Room.java
@@ -85,13 +85,13 @@ public class Room {
85 * @return A description of the available exits. 85 * @return A description of the available exits.
86 */ 86 */
87 public String getExitString() { 87 public String getExitString() {
88 String vExitString = "Available exits:"; 88 StringBuilder vStrBuilder = new StringBuilder("Available exits:");
89 Set<String> vKeys = this.aExits.keySet(); 89 Set<String> vKeys = this.aExits.keySet();
90 for (Iterator<String> vIter = vKeys.iterator(); vIter.hasNext();) { 90 for (Iterator<String> vIter = vKeys.iterator(); vIter.hasNext();) {
91 vExitString += " " + vIter.next(); 91 vStrBuilder.append(" ").append(vIter.next());
92 } 92 }
93 vExitString += "."; 93 vStrBuilder.append(".");
94 return vExitString; 94 return vStrBuilder.toString();
95 } 95 }
96 96
97} 97}