[M] Rename NotificationLogic to AlarmActivationLogic
This commit is contained in:
@@ -24,16 +24,13 @@ func jumpAction() {
|
|||||||
func shakeAction() {
|
func shakeAction() {
|
||||||
regulate = true
|
regulate = true
|
||||||
|
|
||||||
while regulate {
|
|
||||||
motionManager.accelerometerUpdateInterval = 0.2
|
|
||||||
|
motionManager.accelerometerUpdateInterval = 0.2
|
||||||
motionManager.startAccelerometerUpdates(to: OperationQueue.current!) { (data,error) in
|
motionManager.startAccelerometerUpdates(to: OperationQueue.current!) { data, error in
|
||||||
if let myData = data {
|
if data!.acceleration.x > 5 {
|
||||||
if myData.acceleration.x > 5 {
|
print("DO SOMETHING SPECIAL")
|
||||||
print("DO SOMETHING SPECIAL")
|
regulate = false
|
||||||
regulate = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,7 +38,6 @@ func shakeAction() {
|
|||||||
func rpsAction(choice: RPS.Choice) -> Bool? {
|
func rpsAction(choice: RPS.Choice) -> Bool? {
|
||||||
let rps = RPS()
|
let rps = RPS()
|
||||||
return rps.playRPS(you: choice, computer: RPS.randomComputerChoice())
|
return rps.playRPS(you: choice, computer: RPS.randomComputerChoice())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handles the core logic behind the factoring alarm
|
// Handles the core logic behind the factoring alarm
|
||||||
Reference in New Issue
Block a user