Class Beetle
- java.lang.Object
-
- com.iwolverton.smartbeetle.Coord
-
- com.iwolverton.smartbeetle.elements.GameElement
-
- com.iwolverton.smartbeetle.elements.ActingElement
-
- com.iwolverton.smartbeetle.elements.Beetle
-
- Direct Known Subclasses:
BeetleBuilder
public class Beetle extends ActingElement
Our protagonist, a robotic beetle that must keeps its battery charged while fighting off ants and avoiding the spider.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(DrawingParams dp)booleanequals(Object obj)intgetAmmo()intgetCharge()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
-
-
-
-
Method Detail
-
getCharge
public int getCharge()
-
getAmmo
public int getAmmo()
-
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
-
-