Caps-Train/Sources/Cap.swift

28 lines
382 B
Swift
Raw Normal View History

2023-10-23 12:28:35 +02:00
import Foundation
struct Cap: Codable {
let id: Int
let count: Int
enum CodingKeys: String, CodingKey {
case id = "i"
case count = "c"
}
}
struct CapImage: Equatable {
let cap: Int
let image: Int
}
extension CapImage: CustomStringConvertible {
var description: String {
"image \(image) of cap \(cap)"
}
}