Mercurial > public > geoquiz
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GeoQuiz/Logic/CityModel.swift Sat Oct 08 21:36:40 2022 +0200 @@ -0,0 +1,22 @@ +// +// CityModel.swift +// GeoQuiz +// +// Created by Dennis Concepción Martín on 29/9/22. +// + +import Foundation + +struct CityData: Codable { + let cities: [String: City] + + struct City: Codable, Equatable { + let country: String + let lat: Double + let lon: Double + + static func ==(lhs: City, rhs: City) -> Bool { + lhs.country == rhs.country + } + } +}