Class ActingElement
- java.lang.Object
-
- com.iwolverton.smartbeetle.Coord
-
- com.iwolverton.smartbeetle.elements.GameElement
-
- com.iwolverton.smartbeetle.elements.ActingElement
-
public abstract class ActingElement extends GameElement
Superclass for game elements that act. It includes anextMoveproperty that indicates how many turns until the next action.
-
-
Constructor Summary
Constructors Constructor Description ActingElement(int x, int y, int nextMove)ActingElement(Coord coord, int nextMove)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)intgetNextMove()This property indicates how many turns until the next action (e.g.StringtoString()-
Methods inherited from class com.iwolverton.smartbeetle.elements.GameElement
draw
-
Methods inherited from class com.iwolverton.smartbeetle.Coord
altDirectionTo, diagonalDistanceFrom, diagonalDistanceFrom, directionTo, getX, getY, isAt, isAt, randCoord, randCoordPart, rightAngleDistanceFrom, rightAngleDistanceFrom
-
-
-
-
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.
-
equals
public boolean equals(Object other)
- Overrides:
equalsin classGameElement
-
toString
public String toString()
- Overrides:
toStringin classGameElement
-
-