diff GeoQuiz/Logic/GameProtocol+Extension.swift @ 19:f140bb277c96

refactor code
author Dennis C. M. <dennis@denniscm.com>
date Sun, 23 Oct 2022 00:11:38 +0100
parents f1967f8cc67b
children e281791e0494
line wrap: on
line diff
--- a/GeoQuiz/Logic/GameProtocol+Extension.swift	Sat Oct 22 08:56:54 2022 +0100
+++ b/GeoQuiz/Logic/GameProtocol+Extension.swift	Sun Oct 23 00:11:38 2022 +0100
@@ -62,7 +62,7 @@
     }
     
     func answer(_ choice: (key: String, value: T), selector: () -> Void) {
-        let haptics = Haptics()
+        let haptics = HapticsController()
         
         if correctAnswer == choice {
             haptics.success()
@@ -125,7 +125,7 @@
     }
     
     private func playSound(_ filename: String) {
-        let user = User()
+        let user = UserController()
         
         if user.data.sound {
             guard let soundFileURL = Bundle.main.url(forResource: filename, withExtension: "wav") else {