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 TypeMethodDescriptionvoidclear()reset bamboo counter to value 0copy()protected voidlower bambooCount by 1booleanintprotected voidincrement bambooCount by 1protected voidgrowBamboo(int height) increment bambooCount by heightinthashCode()booleanisEmpty()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
-