Package com.starpoints.game.figure
Class CleverComputerFigure
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Figure
-
- com.starpoints.game.ComputerFigure
-
- com.starpoints.game.figure.CleverComputerFigure
-
- All Implemented Interfaces:
FieldListener,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
BlasterTank,BlueChrystalFigure,ChaosDuck,ChrystalMonster,GreenChrystalFigure,GreenWizzFigure,RedChrystalFigure,RedStarFigure,Rocketeer,SwampGhost,TheRat,YellowChrystalFigure
public class CleverComputerFigure extends ComputerFigure implements FieldListener
A more clever computer figure.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intaggressivenessValue for the aggressiveness of this figure, used for rating aspects.protected ItembigMineA big mine that was used by the figure.protected static intBIGMINE_PLACEDHurrying reason bit value for a placed BigMine.protected booleandangerFlag, if a danger - either active rocket or bigmine - was detected on the field.protected static intENEMY_NEARBYHurrying reason bit value for a dangerous enemy nearby.protected inthurryingReasonThe reason for hurrying.protected inthurrySpeedThe speed during hurrying phases.protected static intINVULNERABLEHurrying reason bit value for i invulerable.protected FigurenearestEnemythe nearest enemy.protected intpurposefulnessValue for the focus of this figure, to find a way to the current target point.protected java.util.List<RatingModifier>ratingModifierA map of modifiers for rockets and bigmines placed on the field.protected ItemrocketA rocket that was used by the figure.protected static intROCKET_ACTIVEHurrying reason bit value for an active rocket.protected PointtargetThe current target point of the figure.protected inttargetCountDownCounter for searching a new target.protected inttargetRadiusThe radius in which a target is determined.protected inttargetRatingThe rating of the current target.protected java.util.ArrayList<Point>targetsThe list of points to the current target point.-
Fields inherited from class com.starpoints.game.ComputerFigure
pointList, speedCount, wantsToEnterBlue
-
Fields inherited from class com.starpoints.game.Figure
ABSMAXENERGY, affectsBlue, alreadyKilled, colorlistener, DEFAULT_FIGURE_PAINTERCLASS, dieListener, dieReason, DOWN, energylistener, heatLevel, heatlistener, hoverCount, hoverHeight, hoverlistener, imageName, initialEnergy, INITIALRAMPOWER, isRocketTarget, item, itemlistener, killer, LEFT, lives, MAXHOVERHEIGHT, maxRadius, MAXSLOTS, money, moved, movelistener, name, NONE, number, oldItem, oldRocketXP, oldRocketYP, PANIC, penalty, permItems, pointBonus, pointlistener, points, ramlistener, ramPower, RIGHT, side, sinker, slots, STEPLEFT, STEPRIGHT, stunCount, stunlistener, sumPoints, UP, USE_ITEM, viewDir, visibilitylistener, visibleCount, wantsToUseItem, winCounter
-
Fields inherited from class com.starpoints.game.Thing
energy, energyFx, energyMaxSoundPlayed, energyModifications, explosionCounter, game, innerColor, invulnCount, isAffectedByBlack, isAffectedByGray, level, MAX_TEXTPAINT, maxEnergy, nextID, outerColor, p, shieldCount, status, text
-
-
Constructor Summary
Constructors Constructor Description CleverComputerFigure(Game game, FigureInfo figureInfo)Creates a new CleverComputerFigure.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbombPlaced(ItemBigMine b, AnimationInfo animation)Method that is called when a bigmine is placed on the field.protected intcalculatePointRating(Point p)Gets the point rating for the given point for determining the best next point for this figure.protected voidcheckBigMineUsage()Checks, if a big mine should be used.protected voidcheckHurryingBecauseOfEnemyNearby()Checks, if the nearest enemy is still a reason for hurrying.protected booleancheckHurryingBecauseOfPointColor()Checks, if the color of the current point is a reason to move fast.protected booleancheckIfNewTargetShouldBeSelected()Checks, if the figure wants to select a new target.protected voidcheckRamPowerForUsage()Checks, if a ram power item should be used.protected voidcheckRocketUsage()Checks, if a rocket should be used.protected voidcheckShieldingForUsage()Checks, if a shield item should be used.voiddetermineItemUsage()Checks, if the figure wants to use an item it carries around.protected voiddoSpecialUpdate(AnimationInfo animation)This method is called at the end of the regular updateThing()-method.protected booleanentersExplosion(int power)Checks, if this figure wants to enter an explosion.PointfindPanicTargetPoint(Point dangerPoint, int maxdistance)Finds a target point when in danger because of rocket or bigmine.protected static intgetBigMineRadius(Item i)Gets the radius of a big mine explosion depending on the concrete ItemBigMine-class.protected intgetFogRating(Point p)Gets a rating for the fog on a pointprotected java.lang.StringgetHurryReasonString(int reason)Gets a string representation for the given hurrying reason.intgetIq()Gets the IQ of this figure.protected intgetPointRatingInternal(Point p, boolean selectTarget, boolean ignoreItems)Gets the point rating for a given point during next point calculation - override this method in own computer figure implementations.protected intgetTargetRating(Point target)Gets the point rating for the given target point to check.voidhandleBigMineDetection(Point pfx, Item i)Handles a new big mine detection on the field.voidhandleRocketDetection(Point pfx, Item i)Handles a rocket detection on the field.protected booleanhasBombKit()Checks, if this figure has a bomb kit.protected booleanhasCoolGenerator()Checks, if this figure has a bomb kit.protected booleanhasFireExtinguisher()Checks, if this figure has a fire extinguisher.protected voidhurry(int reason)Lets the figure hurry around for a special reason.protected voidhurry(int reason, int speed)Lets the figure hurry around for a special reason with the given speed.protected booleanisAffectedByBlackInternal()Checks, if this figure is affected by black.protected booleanisAffectedByGrayInternal()Checks, if this figure is affected by gray.booleanisApplyingLevelInfoIQ()Checks, if level IQ setting should be applied to this figure.protected booleanisDangerous(Figure f)Checks, if the figure is dangerous.protected booleanisHeatSource(Point p)Checks, if p is a source of heat.protected booleanisHurryingReason(int reason)Checks, if the given reason is currently a reason for hurrying.protected booleanisInLead()Checks, if this figure is in lead in the current level.protected booleanisInTargetDirX(Point p)Checks, if point is in current targets x direction.protected booleanisInTargetDirY(Point p)Checks, if point is in current targets y direction.protected booleanisRocketFirePoint(Point p)Checks, if the point is the point an own rocket will be fired to.protected booleanisVisible(Figure f)Checks, if the figure f is visible to this figure.protected intmodifyBaseRatingByHeatEffect(Point p, int baseRating)Modifies the rating if the point p is not the current point, and the figure is pretty hot already.protected intmodifyBaseRatingByTargetDirection(Point p, int baseRating)Modifies the rating, if p is in the target direction.protected intmodifyByBlueColor(Point p, int currentRating)Modifies a point rating depending on blue color..protected intmodifyByColor(Point p, int currentRating)Modifies the point rating for movement.intmodifyByItem(int currentRating, Item i)Modifies the rating by an item rating.protected intmodifyByRatingModifiers(Point p, int baseRating)Modifies the point rating by the rating modifiers.protected intmodifyByUnignorableColors(Point p, int currentRating)Checks a points color, even if not to be checked.protected voidmoveFast()Makes the figure move away the next round.protected intrateOtherItem(int currentRating, Item i)Rates other items.protected intratePermanentItem(int currentRating, Item i)Rates permanent items.protected intrateWeapon(int currentRating, Item i)Rates weapons.protected voidreInit(Field f)Reinitializes the figure after each level.voidrocketStarted(ItemRocket r, AnimationInfo animation)Sets the danger flag after a rocket was started.protected voidselectNewTargetPoint()Selects a new target on the field.protected voidselectPanicTarget(Point dangerPoint, int maxdistance, int hurryingReason, Item danger)Selects a target after panicing because of rocket or bigmine.protected voidselectSafeTargetAfterBigMinePlacement(int maxdistance)Selects a target after placing a bigmine.protected voidselectTarget()Selects a new target for the figure.protected booleansetTarget(Point targ, int targetRating)Sets this figures target point.protected voidstay(int rounds)Lets the figure stay on the current point for n rounds.protected voidstopHurry(int reason)Lets the figure stop hurrying for a special reason.protected voidupdateRatingModifiers()Updates the list of modifiers for detected rockets and big mines.protected booleanwantsToMove()Checks, if this figure wants to move.-
Methods inherited from class com.starpoints.game.ComputerFigure
calculateItemRating, calculateNextPoint, checkEnemy, doCalculateNextPoint, entersExplosion, findClosestEnemy, getDistance, getDistance, isDummy, isForbiddenItem, isRamTarget, isUnwantedItem
-
Methods inherited from class com.starpoints.game.Figure
addEnergy, addFigureColorListener, addFigureEnergyListener, addFigureHeatListener, addFigureHoverListener, addFigureItemListener, addFigureKillListener, addFigureMoveListener, addFigurePointListener, addFigureRamListener, addFigureStunListener, addFigureVisibilityListener, addHeat, addInitialEnergy, addLife, addMaxEnergy, addMoney, addPenalty, addPermanentItem, addPoints, addSlots, affectsBlue, beforeMove, beRammed, createState, determineIQ, determineIQ, die, drawState, entersColor, fireColorEnterEvent, fireColorStayEvent, fireDieEvent, fireEnergyChangeEvent, fireEnergyLossEvent, fireGainPermanentItemEvent, fireHeatChangeEvent, fireHoverEvent, fireKillsEnemy, fireLoseItemEvent, fireLosePermanentItemEvent, fireLostPermanentItemEvent, fireMoveEvent, firePickesUpBombEvent, firePickesUpExplosiveEvent, firePickesUpItemEvent, firePointsChangeEvent, firePointSumChangeEvent, fireRamEvent, fireRamPowerEvent, fireSlotsChangeEvent, fireStunEvent, fireUseItemEvent, fireVisibilityChangesEvent, getDieReason, getDyingClip, getExplosionClip, getFreeSlots, getHeatLevel, getHoverHeight, getHoverRounds, getImageName, getInitialEnergy, getInvisibilityRounds, getItem, getKillBonus, getLifes, getMaxSlots, getMoney, getName, getNumber, getPainterClassname, getPermanentItems, getPoints, getPointSum, getRamPower, getSlots, getSpeed, getStunCount, getWinCount, hasMoved, hasPermanentItem, hasPermanentItem, hover, increasePointSum, invulnerable, isAffectedByBlack, isAffectedByGray, isApplyingLevelInfoSpeed, isAvailableInEditor, isDrawingNumber, isHovering, isRocketTarget, isSinking, isStunned, isVisible, loseItem, losePermanentItem, losePermanentItem, losePermanentItemInternal, onAddHeat, onAfterDeath, onBeforeDie, onBeforeRemoveEnergy, onEnemyKilled, onExplode, onRoundBegin, playDyingSound, removeEnergy, removeFigureColorListener, removeFigureEnergyListener, removeFigureHeatListener, removeFigureHoverListener, removeFigureItemListener, removeFigureKillListener, removeFigureMoveListener, removeFigurePointListener, removeFigureRamListener, removeFigureStunListener, removeFigureVisibilityListener, removeMoney, removePoints, retrieveNextPoint, sellPermanentItem, setHoverCount, setHoverHeight, setInitialEnergy, setInvisible, setIq, setIsRocketTarget, setItem, setMaxEnergy, setMoney, setName, setNumber, setPoint, setSlots, setSpeed, setVisible, sink, staysOnColor, stopHover, stopSink, stun, takeItem, toString, updateExplodingStatus, updatePoints, updateThing, useItem, wantsToUseItem, win
-
Methods inherited from class com.starpoints.game.Thing
addShielding, addStateProperties, clearTexts, displayText, displayText, equals, getColor, getEnergy, getEnergyMaxCount, getExplosionCounter, getField, getGame, getID, getInnerColor, getInvulnerableRounds, getLevel, getMaxEnergy, getNextID, getOuterColor, getPoint, getShadowColor, getShield, getStateObject, getStatus, getText, getTextColor, getTextPaintCount, getX, getY, hashCode, isDestroyed, isExploding, isInvulnerable, isOK, isShowingEnergyFx, retrieveState, setEnergy, setEnergyMaxCount, setGame, setStatus, stepText, updateEnergy
-
-
-
-
Field Detail
-
BIGMINE_PLACED
protected static final int BIGMINE_PLACED
Hurrying reason bit value for a placed BigMine.- See Also:
- Constant Field Values
-
ROCKET_ACTIVE
protected static final int ROCKET_ACTIVE
Hurrying reason bit value for an active rocket.- See Also:
- Constant Field Values
-
INVULNERABLE
protected static final int INVULNERABLE
Hurrying reason bit value for i invulerable.- See Also:
- Constant Field Values
-
ENEMY_NEARBY
protected static final int ENEMY_NEARBY
Hurrying reason bit value for a dangerous enemy nearby.- See Also:
- Constant Field Values
-
hurrySpeed
protected int hurrySpeed
The speed during hurrying phases.
-
hurryingReason
protected int hurryingReason
The reason for hurrying. Bit-coded, in case multiple reasons for hurrying exist.
-
target
protected Point target
The current target point of the figure.
-
danger
protected boolean danger
Flag, if a danger - either active rocket or bigmine - was detected on the field.
-
targetRadius
protected int targetRadius
The radius in which a target is determined.
-
targetCountDown
protected int targetCountDown
Counter for searching a new target.
-
targetRating
protected int targetRating
The rating of the current target.
-
bigMine
protected Item bigMine
A big mine that was used by the figure.
-
rocket
protected Item rocket
A rocket that was used by the figure.
-
nearestEnemy
protected Figure nearestEnemy
the nearest enemy.
-
aggressiveness
protected int aggressiveness
Value for the aggressiveness of this figure, used for rating aspects. Default value is 800.
-
purposefulness
protected int purposefulness
Value for the focus of this figure, to find a way to the current target point. Default value is 800.
-
targets
protected java.util.ArrayList<Point> targets
The list of points to the current target point.
-
ratingModifier
protected java.util.List<RatingModifier> ratingModifier
A map of modifiers for rockets and bigmines placed on the field.
-
-
Constructor Detail
-
CleverComputerFigure
public CleverComputerFigure(Game game, FigureInfo figureInfo)
Creates a new CleverComputerFigure.- Parameters:
game- The Game.figureInfo- The FigureInfo.
-
-
Method Detail
-
getIq
public int getIq()
Gets the IQ of this figure. If the background is flickering, the figures iq is reduced by 20.- Overrides:
getIqin classComputerFigure- Returns:
- The IQ.
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
This method is called at the end of the regular updateThing()-method. This performs the following steps: - Update the rating modifiers for bombs and rockets.
- Check, if the current point is dangerous and is a reason for a direct move.
- Check, if the nearest enemy is still a danger.
- Select a new target point, if not in panic.
- Check, if an item should be used.- Overrides:
doSpecialUpdatein classComputerFigure- Parameters:
animation- The AnimationInfo.
-
wantsToMove
protected boolean wantsToMove()
Checks, if this figure wants to move.- Overrides:
wantsToMovein classComputerFigure- Returns:
- true, if either speedCount is reached or this figures point is exploding.
-
isVisible
protected boolean isVisible(Figure f)
Checks, if the figure f is visible to this figure.- Overrides:
isVisiblein classComputerFigure- Parameters:
f- The figure to check- Returns:
- true, if the figure is visible, or it has moved recently and this figure has an IQ greater or equal 140 or if this figure has an IQ of 200 and knows everything.
-
determineItemUsage
public void determineItemUsage()
Checks, if the figure wants to use an item it carries around.
-
checkRamPowerForUsage
protected void checkRamPowerForUsage()
Checks, if a ram power item should be used.
-
checkShieldingForUsage
protected void checkShieldingForUsage()
Checks, if a shield item should be used.
-
checkBigMineUsage
protected void checkBigMineUsage()
Checks, if a big mine should be used.
-
checkRocketUsage
protected void checkRocketUsage()
Checks, if a rocket should be used.
-
selectNewTargetPoint
protected void selectNewTargetPoint()
Selects a new target on the field.
-
checkIfNewTargetShouldBeSelected
protected boolean checkIfNewTargetShouldBeSelected()
Checks, if the figure wants to select a new target.- Returns:
- true, if new target should be selected.
-
getTargetRating
protected int getTargetRating(Point target)
Gets the point rating for the given target point to check.- Parameters:
target- The point to calculate the rating for- Returns:
- The point rating as target.
-
checkHurryingBecauseOfEnemyNearby
protected void checkHurryingBecauseOfEnemyNearby()
Checks, if the nearest enemy is still a reason for hurrying.
-
checkHurryingBecauseOfPointColor
protected boolean checkHurryingBecauseOfPointColor()
Checks, if the color of the current point is a reason to move fast.- Returns:
- true, if figures point is dangerous.
-
updateRatingModifiers
protected void updateRatingModifiers()
Updates the list of modifiers for detected rockets and big mines.
-
calculatePointRating
protected int calculatePointRating(Point p)
Gets the point rating for the given point for determining the best next point for this figure. Retrieves the rating for the point according to item, color, and modifies it by checking if it is target direction.- Overrides:
calculatePointRatingin classComputerFigure- Parameters:
p- The point.- Returns:
- Rating for the point.
-
isRocketFirePoint
protected boolean isRocketFirePoint(Point p)
Checks, if the point is the point an own rocket will be fired to.- Parameters:
p- The point- Returns:
- true, if this figure hasa a rocket, wants to fire it and p is the first point in its targetline.
-
modifyBaseRatingByTargetDirection
protected int modifyBaseRatingByTargetDirection(Point p, int baseRating)
Modifies the rating, if p is in the target direction.- Parameters:
p- The pointbaseRating- The current rating- Returns:
- The modified rating.
-
modifyBaseRatingByHeatEffect
protected int modifyBaseRatingByHeatEffect(Point p, int baseRating)
Modifies the rating if the point p is not the current point, and the figure is pretty hot already.- Parameters:
p- The pointbaseRating- The current rating- Returns:
- The modified rating.
-
isHeatSource
protected boolean isHeatSource(Point p)
Checks, if p is a source of heat.- Parameters:
p- The point.- Returns:
- true, if hot.
-
selectTarget
protected void selectTarget()
Selects a new target for the figure.
-
handleBigMineDetection
public void handleBigMineDetection(Point pfx, Item i)
Handles a new big mine detection on the field.- Parameters:
pfx- The point of the big mine.i- The big mine.
-
handleRocketDetection
public void handleRocketDetection(Point pfx, Item i)
Handles a rocket detection on the field.- Parameters:
pfx- The point of the rocket.i- The rocket.
-
selectSafeTargetAfterBigMinePlacement
protected void selectSafeTargetAfterBigMinePlacement(int maxdistance)
Selects a target after placing a bigmine.- Parameters:
maxdistance- The distance the target should have from the current point.
-
selectPanicTarget
protected void selectPanicTarget(Point dangerPoint, int maxdistance, int hurryingReason, Item danger)
Selects a target after panicing because of rocket or bigmine.- Parameters:
dangerPoint- The dangerous point.maxdistance- the safe distance.hurryingReason- The reason for hurryingdanger- The dangerous item.
-
findPanicTargetPoint
public Point findPanicTargetPoint(Point dangerPoint, int maxdistance)
Finds a target point when in danger because of rocket or bigmine.- Parameters:
dangerPoint- The origin point of the danger.maxdistance- The danger radius around the danger point- Returns:
- A safe point.
-
isDangerous
protected boolean isDangerous(Figure f)
Checks, if the figure is dangerous.- Parameters:
f- The figure- Returns:
- true, if figure is dangerous.
-
modifyByRatingModifiers
protected int modifyByRatingModifiers(Point p, int baseRating)
Modifies the point rating by the rating modifiers.- Parameters:
p- The pointbaseRating- the surrent rating- Returns:
- The modified rating.
-
getPointRatingInternal
protected int getPointRatingInternal(Point p, boolean selectTarget, boolean ignoreItems)
Gets the point rating for a given point during next point calculation - override this method in own computer figure implementations. The simple computer figure takes into account the item that lies on the point and its color. The simple computer figure likes moving to blue points most.- Parameters:
p- The point.selectTarget- Flag, if called during target calculation.ignoreItems- Flag, if items should be ignored for rating.- Returns:
- The point rating.
-
modifyByColor
protected int modifyByColor(Point p, int currentRating)
Modifies the point rating for movement.- Overrides:
modifyByColorin classComputerFigure- Parameters:
p- The point.currentRating- the current rating.- Returns:
- The modified rating.
-
modifyByBlueColor
protected int modifyByBlueColor(Point p, int currentRating)
Modifies a point rating depending on blue color..- Parameters:
p- The point.currentRating- The current rating.- Returns:
- the modified rating.
-
modifyByUnignorableColors
protected int modifyByUnignorableColors(Point p, int currentRating)
Checks a points color, even if not to be checked.- Parameters:
p- The pointcurrentRating- The previous rating- Returns:
- A rating depending on the current rating and the points color.
-
modifyByItem
public int modifyByItem(int currentRating, Item i)Modifies the rating by an item rating.- Parameters:
currentRating- The previous rating.i- The item.- Returns:
- The modified rating.
-
rateOtherItem
protected int rateOtherItem(int currentRating, Item i)Rates other items.- Parameters:
currentRating- The previous rating.i- The item.- Returns:
- The new rating.
-
rateWeapon
protected int rateWeapon(int currentRating, Item i)Rates weapons.- Parameters:
currentRating- The previous rating.i- The item.- Returns:
- The new rating.
-
ratePermanentItem
protected int ratePermanentItem(int currentRating, Item i)Rates permanent items.- Parameters:
currentRating- The previous rating.i- The item.- Returns:
- The new rating.
-
hasFireExtinguisher
protected boolean hasFireExtinguisher()
Checks, if this figure has a fire extinguisher.- Returns:
- true, if this figure has a fire extinguisher.
-
hasBombKit
protected boolean hasBombKit()
Checks, if this figure has a bomb kit.- Returns:
- true, if this figure has a bomb kit.
-
hasCoolGenerator
protected boolean hasCoolGenerator()
Checks, if this figure has a bomb kit.- Returns:
- true, if this figure has a bomb kit.
-
isAffectedByBlackInternal
protected boolean isAffectedByBlackInternal()
Checks, if this figure is affected by black.- Returns:
- false, if either naturally immune to black or a ItemBlackBlocker is owned.
-
isAffectedByGrayInternal
protected boolean isAffectedByGrayInternal()
Checks, if this figure is affected by gray.- Returns:
- false, if either naturally immune to gray or a ItemGrayBlocker is owned.
-
getFogRating
protected int getFogRating(Point p)
Gets a rating for the fog on a point- Parameters:
p- The point.- Returns:
- A rating modification because of the fog.
-
isInLead
protected boolean isInLead()
Checks, if this figure is in lead in the current level.- Returns:
- true, if in lead.
-
hurry
protected void hurry(int reason)
Lets the figure hurry around for a special reason.- Parameters:
reason- The hurrying reason.
-
hurry
protected void hurry(int reason, int speed)Lets the figure hurry around for a special reason with the given speed. If the hurry speed is slower than the current speed, it is ignored.- Parameters:
reason- The hurrying reason.speed- The hurrying speed.
-
isHurryingReason
protected boolean isHurryingReason(int reason)
Checks, if the given reason is currently a reason for hurrying.- Parameters:
reason- The reason constant.- Returns:
- true, if the reason is a reason for hurrying.
-
stopHurry
protected void stopHurry(int reason)
Lets the figure stop hurrying for a special reason.- Parameters:
reason- The reason.
-
entersExplosion
protected boolean entersExplosion(int power)
Checks, if this figure wants to enter an explosion.- Parameters:
power- The explosion power.- Returns:
- true, if this figure would enter this explosion
-
stay
protected void stay(int rounds)
Lets the figure stay on the current point for n rounds.- Parameters:
rounds- The number of rounds to stay.
-
moveFast
protected void moveFast()
Makes the figure move away the next round.
-
setTarget
protected boolean setTarget(Point targ, int targetRating)
Sets this figures target point.- Parameters:
targ- The new targettargetRating- The new targets rating.- Returns:
- true, if the figures has not selected this target more than 3 times of the last 8 targets.
-
reInit
protected void reInit(Field f)
Reinitializes the figure after each level.
-
isInTargetDirX
protected boolean isInTargetDirX(Point p)
Checks, if point is in current targets x direction.- Parameters:
p- The point to check.- Returns:
- true, if point is in current targets x direction.
-
isInTargetDirY
protected boolean isInTargetDirY(Point p)
Checks, if point is in current targets y direction.- Parameters:
p- The point to check.- Returns:
- true, if point is in current targets y direction.
-
getBigMineRadius
protected static int getBigMineRadius(Item i)
Gets the radius of a big mine explosion depending on the concrete ItemBigMine-class.- Parameters:
i- The Big Mine item- Returns:
- The explosion radius
-
isApplyingLevelInfoIQ
public boolean isApplyingLevelInfoIQ()
Checks, if level IQ setting should be applied to this figure.- Overrides:
isApplyingLevelInfoIQin classComputerFigure- Returns:
- true.
-
getHurryReasonString
protected java.lang.String getHurryReasonString(int reason)
Gets a string representation for the given hurrying reason.- Parameters:
reason- The reason constant.- Returns:
- A string represantation.
-
bombPlaced
public void bombPlaced(ItemBigMine b, AnimationInfo animation)
Method that is called when a bigmine is placed on the field.- Specified by:
bombPlacedin interfaceFieldListener- Parameters:
b- The bigmineanimation- The AnimationInfo.
-
rocketStarted
public void rocketStarted(ItemRocket r, AnimationInfo animation)
Sets the danger flag after a rocket was started.- Specified by:
rocketStartedin interfaceFieldListener- Parameters:
r- The rocket.animation- The AnimationInfo.
-
-