Flash Cards now used stored lesson information

This commit is contained in:
Avery Pace
2021-11-09 13:17:22 -05:00
parent 287c9fb8ac
commit 1c928fa876
7 changed files with 151 additions and 42 deletions
@@ -16,7 +16,6 @@ struct FlashCardResultsView: View {
@State private var wordStatistics: [String: Double] = [:]
@State private var sortedWordStatistics: [(String, Double)] = []
@State private var statistics = 0.0
func calculateStatistics() {
for answer in answers {
@@ -38,7 +37,6 @@ struct FlashCardResultsView: View {
} else {
return Color.red
}
}
@@ -57,13 +55,6 @@ struct FlashCardResultsView: View {
}
}
extension Double {
func formatAsPercent(places: Int) -> String {
let formattedValue = String(format: "%.2f", self)
return formattedValue
}
}
struct FlashCardResultView_Previews: PreviewProvider {
static var previews: some View {
FlashCardResultsView()