Class AntHill
- java.lang.Object
-
- com.iwolverton.smartbeetle.Coord
-
- com.iwolverton.smartbeetle.elements.GameElement
-
- com.iwolverton.smartbeetle.elements.ActingElement
-
- com.iwolverton.smartbeetle.elements.AntHill
-
public class AntHill extends ActingElement
The ant hill. Ants periodically appear from this hill. The frequency increases as the game goes on. Check itsnextMoveproperty to see how many turns until the next ant--one means it will be this turn, immediately after the beetle's action.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(DrawingParams dp)booleanequals(Object obj)intgetFrequency()StringtoString()-
Methods inherited from class com.iwolverton.smartbeetle.elements.ActingElement
getNextMove
-
Methods inherited from class com.iwolverton.smartbeetle.Coord
altDirectionTo, diagonalDistanceFrom, diagonalDistanceFrom, directionTo, getX, getY, isAt, isAt, randCoord, randCoordPart, rightAngleDistanceFrom, rightAngleDistanceFrom
-
-
-
-
Constructor Detail
-
AntHill
public AntHill(int x, int y, int nextMove, int frequency)
-
AntHill
public AntHill(Coord coord, int nextMove, int frequency)
-
-
Method Detail
-
getFrequency
public int getFrequency()
-
draw
public void draw(DrawingParams dp)
- Specified by:
drawin classGameElement
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classActingElement
-
toString
public String toString()
- Overrides:
toStringin classActingElement
-
-