From 3ff1fbbc8c79ebd86b74e53b8a4d08a51adcc1b6 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 18 May 2014 23:55:52 +0200 Subject: Move location update to Beamer --- src/esieequest/controller/commands/UseCommand.java | 4 ---- src/esieequest/model/items/Beamer.java | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/esieequest/controller/commands/UseCommand.java b/src/esieequest/controller/commands/UseCommand.java index 170050e..c90bb8f 100644 --- a/src/esieequest/controller/commands/UseCommand.java +++ b/src/esieequest/controller/commands/UseCommand.java @@ -30,10 +30,6 @@ public class UseCommand implements Executable { final Item item = game.getPlayer().getInventory().getItem(itemName); item.use(game, view); - view.updateLocation(game.getPlayer().getCurrentRoom(), game.getPlayer() - .getCurrentDirection(), game.getPlayer().getCurrentSide(), game.getPlayer() - .canGoBack()); - } } diff --git a/src/esieequest/model/items/Beamer.java b/src/esieequest/model/items/Beamer.java index b452e87..053be18 100644 --- a/src/esieequest/model/items/Beamer.java +++ b/src/esieequest/model/items/Beamer.java @@ -41,6 +41,10 @@ public class Beamer extends SimpleItem { view.echo(Text.BEAMER_TELEPORTED.toString()); this.room = null; } + + view.updateLocation(game.getPlayer().getCurrentRoom(), game.getPlayer() + .getCurrentDirection(), game.getPlayer().getCurrentSide(), game.getPlayer() + .canGoBack()); } @Override -- cgit v1.2.3