Class ItemExplosion

  • All Implemented Interfaces:
    ItemRammable, java.io.Serializable, java.lang.Cloneable

    public class ItemExplosion
    extends Item
    implements ItemRammable
    Item, that simply explodes and cannot be entered.
    See Also:
    Serialized Form
    • Constructor Detail

      • ItemExplosion

        public ItemExplosion()
        Creates a new ItemExplosion.
    • Method Detail

      • getItemRating

        public int getItemRating()
        Returns an item value for ComputerFigures rating in the items category.
        Overrides:
        getItemRating in class Item
        Returns:
        energy * -1000.
      • getImageName

        public java.lang.String getImageName​(AnimationInfo animation)
        Returns image name.
        Overrides:
        getImageName in class Thing
        Parameters:
        animation - The AnimationInfo.
        Returns:
        "explosion9"
      • onBePickedUp

        public boolean onBePickedUp​(Figure picker,
                                    AnimationInfo animation)
        Lets the collector explode.
        Overrides:
        onBePickedUp in class Item
        Parameters:
        picker - The (stupid) collector of the explosion.
        animation - The AnimationInfo.
        Returns:
        false - cannot be carried around.
      • doSpecialUpdate

        protected void doSpecialUpdate​(AnimationInfo animation)
        Updates this thing after each round. If this thing is destroyed, its status is set back to exploding.
        Overrides:
        doSpecialUpdate in class Item
        Parameters:
        animation - The AnimationInfo.
      • getRamPower

        public int getRamPower()
        Gets the ram power.
        Specified by:
        getRamPower in interface ItemRammable
        Returns:
        1000.
      • beRammed

        public boolean beRammed​(Figure rammer,
                                AnimationInfo animation)
        Returns false.
        Specified by:
        beRammed in interface ItemRammable
        Parameters:
        rammer - The rammer
        animation - the AnimationInfo.
        Returns:
        true, if the figure can enter the items point.