Class RandomManager

  • All Implemented Interfaces:
    java.lang.Runnable

    public class RandomManager
    extends java.lang.Object
    implements java.lang.Runnable
    • Constructor Detail

      • RandomManager

        public RandomManager​(java.lang.Thread scriptThread,
                             AbstractScript script)
    • Method Detail

      • getSolver

        public RandomSolver getSolver​(java.lang.String eventName)
      • registerSolver

        public void registerSolver​(RandomSolver solver)
        Registers a random solver with priority higher than default. If two or more random solvers are registered, the one registered last will have priority
        Parameters:
        solver - Random solver to addConnector
      • unregisterSolver

        public void unregisterSolver​(RandomEvent event)
        Removes a random solver. If there are more than one, the one with highest priority is removed (script registered ones, then default)
        Parameters:
        event - Event of random solver to be removed
      • unregisterSolver

        public void unregisterSolver​(java.lang.String event)
      • onLoop

        public int onLoop()
        Does the login for checking and running a random solver
        Returns:
        -1 if no random solvers running, otherwise delay time
      • isSolving

        public boolean isSolving()
      • disableSolver

        public void disableSolver​(java.lang.String event)
      • disableSolver

        public void disableSolver​(RandomEvent event)
      • enableSolver

        public void enableSolver​(java.lang.String event)
      • enableSolver

        public void enableSolver​(RandomEvent event)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • runRandomManager

        public void runRandomManager()
      • kill

        public void kill()