comparison GeoQuiz/GuessTheCapitalView.swift @ 8:e09959b4e4a8

fix bugs
author Dennis C. M. <dennis@denniscm.com>
date Thu, 06 Oct 2022 11:14:34 +0200
parents d945e52b0704
children a793f33f05fb
comparison
equal deleted inserted replaced
7:d945e52b0704 8:e09959b4e4a8
43 } 43 }
44 44
45 VStack { 45 VStack {
46 ForEach(Array(game.userChoices.keys), id: \.self) { countryName in 46 ForEach(Array(game.userChoices.keys), id: \.self) { countryName in
47 Button { 47 Button {
48 game.answer((key: countryName, value: game.data[countryName]!)) 48 game.answer((key: countryName, value: game.data[countryName]!)) {
49 game.selector()
50 }
49 } label: { 51 } label: {
50 AnswerButton( 52 AnswerButton(
51 optionName: game.data[countryName]!.capital, 53 optionName: game.data[countryName]!.capital,
52 color: .chinaPink 54 color: .chinaPink
53 ) 55 )