Package com.takenoko.layers.bamboo
Class BambooStack
java.lang.Object
com.takenoko.layers.bamboo.BambooStack
- Direct Known Subclasses:
InventoryBambooStack
,LayerBambooStack
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
reset bamboo counter to value 0copy()
protected void
lower bambooCount by 1boolean
int
protected void
increment bambooCount by 1protected void
growBamboo
(int height) increment bambooCount by heightint
hashCode()
boolean
isEmpty()
void
-
Field Details
-
bambooCount
protected int bambooCount
-
-
Constructor Details
-
BambooStack
public BambooStack(int startingBamboo) -
BambooStack
-
-
Method Details
-
growBamboo
protected void growBamboo()increment bambooCount by 1 -
growBamboo
protected void growBamboo(int height) increment bambooCount by height -
eatBamboo
protected void eatBamboo()lower bambooCount by 1 -
getBambooCount
public int getBambooCount()- Returns:
- number of bamboos
-
equals
-
hashCode
public int hashCode() -
copy
-
isEmpty
public boolean isEmpty()- Returns:
- true if bambooCount is 0
-
clear
public void clear()reset bamboo counter to value 0 -
useBamboo
-