From 017d326b42ed4e77b26b0f2b4a865c9b46bb3004 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Wed, 5 Mar 2014 11:54:41 +0100 Subject: Fix look() printing overriding --- src/esieequest/controller/Performer.java | 8 ++++---- 1 file 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 { } public void look() { - this.echo(this.game.getLocationInfo()); - this.listItems(); + this.echo(this.game.getLocationInfo()+"\n"+this.listItems()); } - private void listItems() { + private String listItems() { if (!this.game.getItemList().isEmpty()) { - this.echo(this.game.getItemListPrefix() + this.buildListString(this.game.getItemList())); + return this.game.getItemListPrefix() + this.buildListString(this.game.getItemList()); } + return ""; } public void eat() { -- cgit v1.2.3