From f84606424a6d14d9a125aca48de5d5b7934eaa7a Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 23 Feb 2014 22:27:36 +0100 Subject: Add description getter --- src/esieequest/Room.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/esieequest/Room.java b/src/esieequest/Room.java index 9bfb40b..0ba71d9 100644 --- a/src/esieequest/Room.java +++ b/src/esieequest/Room.java @@ -7,9 +7,9 @@ import java.util.Set; * A room. * * A "Room" represents one location in the scenery of the game. It is connected - * to other rooms via exits. The exits are labeled north, east, south, west. - * For each direction, the room stores a reference to the neighboring room, or - * null if there is no exit in that direction. + * to other rooms via exits. The exits are labeled north, east, south, west. For + * each direction, the room stores a reference to the neighboring room, or null + * if there is no exit in that direction. * * @author Pacien TRAN-GIRARD * @author Benoit LUBRANO DI SBARAGLIONE @@ -34,6 +34,14 @@ public class Room { } + /** + * Return the description of the room (the one that was defined in the + * constructor). + */ + public String getShortDescription() { + return this.aDescription; + } + /** * Return a long description of this room, of the form: * -- cgit v1.2.3