diff GeoQuiz/Logic/GameInfoProtocol.swift @ 19:f140bb277c96

refactor code
author Dennis C. M. <dennis@denniscm.com>
date Sun, 23 Oct 2022 00:11:38 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GeoQuiz/Logic/GameInfoProtocol.swift	Sun Oct 23 00:11:38 2022 +0100
@@ -0,0 +1,27 @@
+//
+//  GameInfoProtocol+Structs.swift
+//  GeoQuiz
+//
+//  Created by Dennis Concepción Martín on 20/10/22.
+//
+
+import Foundation
+import SwiftUI
+
+@objc
+public enum GameType: Int16, CaseIterable {
+    case guessTheFlag
+    case guessTheCapital
+    case guessTheCountry
+    case guessThePopulation
+}
+
+protocol GameInfo {
+    var type: GameType { get }
+    var level: String { get }
+    var name: String { get }
+    var isPremium: Bool { get }
+    var symbol: String { get }
+    var gradient: Gradient { get }
+    var numberOfQuestions: Int { get }
+}