Class BlueCrawler

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

    public class BlueCrawler
    extends ComputerFigure
    Simple computer figure that colors every point around him randomly blue and starts a chain explosion when dying.
    See Also:
    Serialized Form
    • Constructor Detail

      • BlueCrawler

        public BlueCrawler​(Game game,
                           FigureInfo figureInfo)
        Creates a BlueCrawler.
        Parameters:
        game - The game.
        figureInfo - The FigureInfo.
    • Method Detail

      • onAddHeat

        public int onAddHeat​(int heat,
                             boolean internal,
                             Thing source)
        Returns 0 - Blue fog immune to heat.
        Overrides:
        onAddHeat in class Figure
        Parameters:
        heat - The original heat.
        internal - Flag, if heat comes from inside figure.
        source - The source of the heat gain.
        Returns:
        0
      • doSpecialUpdate

        protected void doSpecialUpdate​(AnimationInfo animation)
        This method is called at the end of the regular updateThing()-method. Colors all points around blue. If the BlueFog is exploding, it start a chain explosion from his point (after 4 rounds of exploding).
        Overrides:
        doSpecialUpdate in class ComputerFigure
        Parameters:
        animation - The AnimationInfo.