Mercurial > public > geoquiz
view GeoQuiz/GameStatsModalView.swift @ 6:1946bbfde4af
reformat data structures
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Thu, 29 Sep 2022 12:00:17 +0200 |
parents | de54f05adb78 |
children |
line wrap: on
line source
//// //// GameStatsModalView.swift //// GeoQuiz //// //// Created by Dennis Concepción Martín on 22/9/22. //// // //import SwiftUI // //struct GameStatsModalView<T: Game>: View { // @ObservedObject var game: T // @Environment(\.dismiss) var dismiss // // var body: some View { // NavigationView { // List { // Section { // ForEach(Array(game.correctAnswers.keys), id: \.self) { key in // Text(key) // } // } header: { // Text("Correct answers") // } // // Section { // ForEach(Array(game.wrongAnswers.keys), id: \.self) { key in // Text(key) // } // } header: { // Text("Wrong answers") // } // } // .navigationTitle("Game stats") // .toolbar { // ToolbarItem(placement: .cancellationAction) { // Button { // dismiss() // } label: { // Label("Exit", systemImage: "multiply") // } // } // } // } // } //} // //struct GameStatsModalView_Previews: PreviewProvider { // static var previews: some View { // GameStatsModalView(game: GuessTheFlag()) // } //}