Mercurial > public > geoquiz
comparison GeoQuiz/Logic/CityModel.swift @ 10:a793f33f05fb
refactor code and fix layout
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Sat, 08 Oct 2022 21:36:40 +0200 |
parents | GeoQuiz/Models/CityModel.swift@1946bbfde4af |
children | f140bb277c96 |
comparison
equal
deleted
inserted
replaced
9:3540c7efc216 | 10:a793f33f05fb |
---|---|
1 // | |
2 // CityModel.swift | |
3 // GeoQuiz | |
4 // | |
5 // Created by Dennis Concepción Martín on 29/9/22. | |
6 // | |
7 | |
8 import Foundation | |
9 | |
10 struct CityData: Codable { | |
11 let cities: [String: City] | |
12 | |
13 struct City: Codable, Equatable { | |
14 let country: String | |
15 let lat: Double | |
16 let lon: Double | |
17 | |
18 static func ==(lhs: City, rhs: City) -> Bool { | |
19 lhs.country == rhs.country | |
20 } | |
21 } | |
22 } |