1 | package com.takenoko.inventory; | |
2 | ||
3 | import com.takenoko.layers.bamboo.BambooStack; | |
4 | ||
5 | /** InventoryBambooStack represents the bamboos collected by the player */ | |
6 | public class InventoryBambooStack extends BambooStack { | |
7 | ||
8 | public InventoryBambooStack(int startingBamboo) { | |
9 | super(startingBamboo); | |
10 | } | |
11 | ||
12 | /** add 1 bamboo to inventory */ | |
13 | public void collectBamboo() { | |
14 |
1
1. collectBamboo : removed call to com/takenoko/inventory/InventoryBambooStack::growBamboo → KILLED |
growBamboo(); |
15 | } | |
16 | ||
17 | public InventoryBambooStack(InventoryBambooStack bambooStack) { | |
18 | super(bambooStack.getBambooCount()); | |
19 | } | |
20 | ||
21 | @Override | |
22 | public InventoryBambooStack copy() { | |
23 |
1
1. copy : replaced return value with null for com/takenoko/inventory/InventoryBambooStack::copy → KILLED |
return new InventoryBambooStack(this); |
24 | } | |
25 | ||
26 | @Override | |
27 | public String toString() { | |
28 |
1
1. toString : replaced return value with "" for com/takenoko/inventory/InventoryBambooStack::toString → TIMED_OUT |
return "InventoryBambooStack{" + "bambooCount=" + bambooCount + '}'; |
29 | } | |
30 | } | |
Mutations | ||
14 |
1.1 |
|
23 |
1.1 |
|
28 |
1.1 |