Class BambooLayer

java.lang.Object
com.takenoko.layers.bamboo.BambooLayer

public class BambooLayer extends Object
BambooLayer class. The bamboo layer contains the number of bamboo on each tile.
  • Field Details

  • Constructor Details

    • BambooLayer

      public BambooLayer()
      Constructor for the BambooLayer class.
    • BambooLayer

      public BambooLayer(BambooLayer bambooLayer)
  • Method Details

    • growBamboo

      public LayerBambooStack growBamboo(PositionVector positionVector, Board board)
      Grow bamboo on a tile. By default, the number of bamboo is 1 if the tile is irrigated.
      Parameters:
      positionVector - the position of the tile
      board - the board
      Returns:
      the number of bamboo grown
    • getBambooAt

      public LayerBambooStack getBambooAt(PositionVector positionVector, Board board)
      Get the number of bamboo on a tile.
      Parameters:
      positionVector - the position of the tile
      board - the board
      Returns:
      the number of bamboo on the tile
    • eatBamboo

      public void eatBamboo(PositionVector positionVector, Board board)
      Eat a bamboo from a tile.
      Parameters:
      positionVector - the position of the tile
      board - the board
    • copy

      public BambooLayer copy()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isEatableAt

      public boolean isEatableAt(PositionVector positionVector, Board board)
    • isGrowableAt

      public boolean isGrowableAt(PositionVector positionVector, Board board)
    • getGrowablePositions

      public List<PositionVector> getGrowablePositions(Board board)