diff options
Diffstat (limited to 'src/esieequest/model/entities/Player.java')
-rw-r--r-- | src/esieequest/model/entities/Player.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/esieequest/model/entities/Player.java b/src/esieequest/model/entities/Player.java index 5a97726..91888eb 100644 --- a/src/esieequest/model/entities/Player.java +++ b/src/esieequest/model/entities/Player.java | |||
@@ -11,12 +11,14 @@ public class Player { | |||
11 | private final Stack<Room> previousRooms; | 11 | private final Stack<Room> previousRooms; |
12 | 12 | ||
13 | private final Inventory inventory; | 13 | private final Inventory inventory; |
14 | private final int maxCarryWeight; | ||
14 | 15 | ||
15 | public Player() { | 16 | public Player(final int maxCarryWeight) { |
16 | this.currentRoom = null; | 17 | this.currentRoom = null; |
17 | this.previousRooms = new Stack<Room>(); | 18 | this.previousRooms = new Stack<Room>(); |
18 | 19 | ||
19 | this.inventory = new Inventory(); | 20 | this.inventory = new Inventory(); |
21 | this.maxCarryWeight = maxCarryWeight; | ||
20 | } | 22 | } |
21 | 23 | ||
22 | /** | 24 | /** |
@@ -57,4 +59,11 @@ public class Player { | |||
57 | return this.inventory; | 59 | return this.inventory; |
58 | } | 60 | } |
59 | 61 | ||
62 | /** | ||
63 | * @return the maxCarryWeight | ||
64 | */ | ||
65 | public int getMaxCarryWeight() { | ||
66 | return this.maxCarryWeight; | ||
67 | } | ||
68 | |||
60 | } | 69 | } |