@Override public Action getReplacementActionFor(Action action) { if (action.getClass().equals(WakeUpAction.class)) { if (die.nextInt(100) < _sleepInPercentage) { return new FallAsleepAction(); } return new WakeUpAction(); } return null; }
@Override public Boolean willReplaceAction(Action action) { return (action.getClass().equals(WakeUpAction.class)); }