diff options
author | Pacien TRAN-GIRARD | 2014-03-05 11:54:41 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-03-05 11:54:41 +0100 |
commit | 017d326b42ed4e77b26b0f2b4a865c9b46bb3004 (patch) | |
tree | 6dd2a2ed17b8174029b1f9e355aff2bf922bd13d | |
parent | df2bf2cfdb75c474764b7b443c4a203bb1fe7075 (diff) | |
download | esieequest-017d326b42ed4e77b26b0f2b4a865c9b46bb3004.tar.gz |
Fix look() printing overriding
-rw-r--r-- | src/esieequest/controller/Performer.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/esieequest/controller/Performer.java b/src/esieequest/controller/Performer.java index 29b5fc8..e8aefec 100644 --- a/src/esieequest/controller/Performer.java +++ b/src/esieequest/controller/Performer.java | |||
@@ -75,14 +75,14 @@ public class Performer { | |||
75 | } | 75 | } |
76 | 76 | ||
77 | public void look() { | 77 | public void look() { |
78 | this.echo(this.game.getLocationInfo()); | 78 | this.echo(this.game.getLocationInfo()+"\n"+this.listItems()); |
79 | this.listItems(); | ||
80 | } | 79 | } |
81 | 80 | ||
82 | private void listItems() { | 81 | private String listItems() { |
83 | if (!this.game.getItemList().isEmpty()) { | 82 | if (!this.game.getItemList().isEmpty()) { |
84 | this.echo(this.game.getItemListPrefix() + this.buildListString(this.game.getItemList())); | 83 | return this.game.getItemListPrefix() + this.buildListString(this.game.getItemList()); |
85 | } | 84 | } |
85 | return ""; | ||
86 | } | 86 | } |
87 | 87 | ||
88 | public void eat() { | 88 | public void eat() { |