private string CloseDoor() { SetMsgColor(); if (safeDoor != SafeDoor.Open) { return("Door is already closed."); } else { safeDoor = SafeDoor.ClosedUnlocked; return(""); }; }
private string LockDoor() { SetMsgColor(); if (safeDoor == SafeDoor.Open) { return("Door must be closed before locking it."); } else if (safeDoor == SafeDoor.Locked) { return("Door is already locked."); } else { safeDoor = SafeDoor.Locked; return(""); } }
private string OpenDoor() { SetMsgColor(); if (safeDoor == SafeDoor.Open) { return("Door is already open."); } else if (safeDoor == SafeDoor.Locked) { return("Door is locked, you need to unlock it."); } else { safeDoor = SafeDoor.Open; return(""); } }
private string UnlockDoor() { safeDoor = SafeDoor.ClosedUnlocked; return(""); }