World.swift 374 B

12345678910
  1. import Crypto
  2. public struct WorldMeta {
  3. private init() { }
  4. public static let maxId: UInt32 = 10000
  5. public static let randomId = { () -> UInt32 in UInt32(1) + (try! Random.makeUInt32()) % maxId }
  6. public static let maxRandomNumber: Int32 = 10000
  7. public static let randomRandomNumber = { () -> Int32 in Int32(1) + abs(try! Random.makeInt32()) % maxRandomNumber }
  8. }