Class ActingElement

  • Direct Known Subclasses:
    Ant, AntHill, Beetle, Spider

    public abstract class ActingElement
    extends GameElement
    Superclass for game elements that act. It includes a nextMove property that indicates how many turns until the next action.
    • Constructor Detail

      • ActingElement

        public ActingElement​(int x,
                             int y,
                             int nextMove)
      • ActingElement

        public ActingElement​(Coord coord,
                             int nextMove)
    • Method Detail

      • getNextMove

        public int getNextMove()
        This property indicates how many turns until the next action (e.g. spider moves or new ant from the hill)--one means it will be this turn, immediately after the beetle's action.