2024-12-19 16:25:05 +01:00

15 lines
232 B
Swift

extension Int {
static func random() -> Int {
random(in: Int.min...Int.max)
}
mutating func increment(_ increment: Bool) {
guard increment else {
return
}
self += 1
}
}