Java:
package Skills.logical;
import Auxiliary_Modules.Responder;
import Auxiliary_Modules.TimeGate;
import LivinGrimoire.Mutatable;
public class APSleep extends Mutatable {
protected TimeGate timeGate = new TimeGate();
public Responder wakeners;
public Boolean done = false;
public APSleep(Responder wakeners) {
this.wakeners = wakeners;
}
@Override
public String action(String ear, String skin, String eye) {
if (wakeners.responsesContainsStr(ear) || timeGate.isClosed()){
done = true;
return "waking up";
}
if (!ear.isEmpty()){return "zzz";}
return "";
}
@Override
public Boolean completed() {
return done;
}
}