Mercurial > public > geoquiz
comparison GeoQuiz/GuessTheCountryView.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 |
---|---|
19 VStack(spacing: 20) { | 19 VStack(spacing: 20) { |
20 GameToolbar(game: game, color: .pinkLavender) | 20 GameToolbar(game: game, color: .pinkLavender) |
21 | 21 |
22 Spacer() | 22 Spacer() |
23 | 23 |
24 CityMap(game: game) | 24 CityMap(game: game, geo: geo) |
25 | 25 |
26 Spacer() | 26 Spacer() |
27 | 27 |
28 HStack { | 28 HStack { |
29 VStack(alignment: .leading, spacing: 10) { | 29 VStack(alignment: .leading, spacing: 10) { |
41 } | 41 } |
42 | 42 |
43 VStack { | 43 VStack { |
44 ForEach(Array(game.userChoices.keys), id: \.self) { cityName in | 44 ForEach(Array(game.userChoices.keys), id: \.self) { cityName in |
45 Button { | 45 Button { |
46 game.answer((key: cityName, value: game.data[cityName]!)) | 46 game.answer((key: cityName, value: game.data[cityName]!)) { |
47 game.selector() | |
48 } | |
47 } label: { | 49 } label: { |
48 AnswerButton( | 50 AnswerButton( |
49 optionName: game.data[cityName]!.country, | 51 optionName: game.data[cityName]!.country, |
50 color: .blueBell | 52 color: .blueBell |
51 ) | 53 ) |