Class BreakSolver

  • All Implemented Interfaces:
    java.util.EventListener, PaintListener

    public class BreakSolver
    extends RandomSolver
    implements PaintListener, java.util.EventListener
    Break Solver/Handler class.
    • Constructor Detail

      • BreakSolver

        public BreakSolver()
    • Method Detail

      • shouldExecute

        public boolean shouldExecute()
        Checks whether the random even solver should execute; This method must be overridden
        Specified by:
        shouldExecute in class RandomSolver
        Returns:
        true as long as the random executor should be executing
      • onLoop

        public int onLoop()
        Runs as long as shouldExecute returns true; This method must be overridden
        Specified by:
        onLoop in class RandomSolver
        Returns:
        time to delay before next onLoop
      • onPaint

        public void onPaint​(java.awt.Graphics graphics)
        Description copied from interface: PaintListener
        Handles the graphic for the script.
        Specified by:
        onPaint in interface PaintListener
        Overrides:
        onPaint in class RandomSolver
        Parameters:
        graphics - The Graphics instance sent from the canvas.
      • onClick

        public void onClick​(java.awt.Point point)
      • isBreakRunning

        public boolean isBreakRunning()