|
|
|
@ -15,13 +15,35 @@ enum AIT: String, CaseIterable, Identifiable, Hashable {
|
|
|
|
|
var id: String { self.rawValue }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum Language: String, CaseIterable, Identifiable, Hashable {
|
|
|
|
|
case French = "Français"
|
|
|
|
|
case English = "English"
|
|
|
|
|
var id: String { self.rawValue }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum Rules: String, CaseIterable, Identifiable, Hashable {
|
|
|
|
|
case Easy = "Simple"
|
|
|
|
|
case Regular = "Normal"
|
|
|
|
|
var id: String { self.rawValue }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct ParametersMenuView: View {
|
|
|
|
|
@State private var selectOption: AIT = .RandomAction
|
|
|
|
|
@State private var selectedAIOption: AIT = .RandomAction
|
|
|
|
|
@State private var selectedLanguageOption: Language = .French
|
|
|
|
|
@State private var selectedRulesOption: Rules = .Regular
|
|
|
|
|
var body: some View {
|
|
|
|
|
VStack {
|
|
|
|
|
DoushiQiPicker(title: "Selectionne une IA :",
|
|
|
|
|
selectedOption: $selectOption,
|
|
|
|
|
ToggleView()
|
|
|
|
|
DoushiQiPicker(title: "Sélectionne une IA :",
|
|
|
|
|
selectedOption: $selectedAIOption,
|
|
|
|
|
options: AIT.allCases)
|
|
|
|
|
DoushiQiPicker(title: "Sélectionne un langage :",
|
|
|
|
|
selectedOption: $selectedLanguageOption,
|
|
|
|
|
options: Language.allCases)
|
|
|
|
|
DoushiQiPicker(title: "Sélectionne les règles :",
|
|
|
|
|
selectedOption: $selectedRulesOption,
|
|
|
|
|
options: Rules.allCases)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|