914 lines
27 KiB
Plaintext
914 lines
27 KiB
Plaintext
module horse/global/race
|
||
|
||
// Automatically generated with horsegen; DO NOT EDIT
|
||
|
||
import std/core/delayed
|
||
import std/core/vector
|
||
import std/core-extras
|
||
import std/data/rb-map
|
||
import horse/game-id
|
||
pub import horse/race
|
||
|
||
extern create-id-table(): vector<int>
|
||
c inline "int32_t arr[] = {1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1101,1102,1103,1104,1105,1106,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4030,4031,4032,4033,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,4061,4062,4063,4064,4065,4066,4068,4069,4070,4071,4072,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4118,4119,4120,4121,4122,4123,4124,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,};\nkk_vector_from_cint32array(arr, (kk_ssize_t)285, kk_context())"
|
||
js inline "[1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1101,1102,1103,1104,1105,1106,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4030,4031,4032,4033,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,4061,4062,4063,4064,4065,4066,4068,4069,4070,4071,4072,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4118,4119,4120,4121,4122,4123,4124,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,]"
|
||
// Vector of all race IDs in order for easy iterating.
|
||
pub val all = once(create-id-table)
|
||
|
||
val name2id = once()
|
||
var m: rbmap<string, int> := empty()
|
||
all().foreach() fn(id) m := m.set(Race-id(id).show, id)
|
||
m
|
||
|
||
// Get the race ID that has the given exact name.
|
||
// Alternate versions of races have an indication of their ID in their names.
|
||
// If no race matches the name, the result is an invalid ID.
|
||
pub fun from-name(name: string): race-id
|
||
Race-id(name2id().rb-map/lookup(name).default(0))
|
||
|
||
// Get the name for a race.
|
||
// Alternate versions of races have an indication of their ID in their names.
|
||
// If no race matches the ID, the result is the numeric ID.
|
||
pub fun show(r: race-id): string
|
||
match r.game-id
|
||
1001 -> "February Stakes"
|
||
1002 -> "Takamatsunomiya Kinen"
|
||
1003 -> "Osaka Hai"
|
||
1004 -> "Oka Sho"
|
||
1005 -> "Satsuki Sho"
|
||
1006 -> "Tenno Sho (Spring)"
|
||
1007 -> "NHK Mile Cup"
|
||
1008 -> "Victoria Mile"
|
||
1009 -> "Japanese Oaks"
|
||
1010 -> "Tokyo Yushun (Japanese Derby)"
|
||
1011 -> "Yasuda Kinen"
|
||
1012 -> "Takarazuka Kinen"
|
||
1013 -> "Sprinters Stakes"
|
||
1014 -> "Shuka Sho"
|
||
1015 -> "Kikuka Sho"
|
||
1016 -> "Tenno Sho (Autumn)"
|
||
1017 -> "Queen Elizabeth II Cup"
|
||
1018 -> "Mile Championship"
|
||
1019 -> "Japan Cup"
|
||
1020 -> "Champions Cup"
|
||
1021 -> "Hanshin Juvenile Fillies"
|
||
1022 -> "Asahi Hai Futurity Stakes"
|
||
1023 -> "Arima Kinen"
|
||
1024 -> "Hopeful Stakes"
|
||
1025 -> "Takarazuka Kinen" ++ " (Alternate 1025)"
|
||
1026 -> "Kikuka Sho" ++ " (Alternate 1026)"
|
||
1027 -> "Tenno Sho (Spring)" ++ " (Alternate 1027)"
|
||
1028 -> "Satsuki Sho" ++ " (Alternate 1028)"
|
||
1101 -> "Teio Sho"
|
||
1102 -> "Japan Dirt Derby"
|
||
1103 -> "JBC Ladies’ Classic"
|
||
1104 -> "JBC Sprint"
|
||
1105 -> "JBC Classic"
|
||
1106 -> "Tokyo Daishoten"
|
||
2001 -> "Nikkei Shinshun Hai"
|
||
2002 -> "Tokai Stakes"
|
||
2003 -> "American JCC"
|
||
2004 -> "Kyoto Kinen"
|
||
2005 -> "Nakayama Kinen"
|
||
2006 -> "Yayoi Sho"
|
||
2007 -> "Kinko Sho"
|
||
2008 -> "Fillies' Revue"
|
||
2009 -> "Hanshin Daishoten"
|
||
2010 -> "Spring Stakes"
|
||
2011 -> "Nikkei Sho"
|
||
2012 -> "Hanshin Umamusume Stakes"
|
||
2013 -> "New Zealand Trophy"
|
||
2014 -> "Milers Cup"
|
||
2015 -> "Flora Stakes"
|
||
2016 -> "Aoba Sho"
|
||
2017 -> "Kyoto Shimbun Hai"
|
||
2018 -> "Keio Hai Spring Cup"
|
||
2019 -> "Meguro Kinen"
|
||
2020 -> "Sapporo Kinen"
|
||
2021 -> "Centaur Stakes"
|
||
2022 -> "Rose Stakes"
|
||
2023 -> "St. Lite Kinen"
|
||
2024 -> "Kobe Shimbun Hai"
|
||
2025 -> "All Comers"
|
||
2026 -> "Mainichi Okan"
|
||
2027 -> "Kyoto Daishoten"
|
||
2028 -> "Fuchu Umamusume Stakes"
|
||
2029 -> "Swan Stakes"
|
||
2030 -> "Keio Hai Junior Stakes"
|
||
2031 -> "Copa Republica Argentina"
|
||
2032 -> "Daily Hai Junior Stakes"
|
||
2033 -> "Stayers Stakes"
|
||
2034 -> "Hanshin Cup"
|
||
2035 -> "Spring Stakes" ++ " (Alternate 2035)"
|
||
3001 -> "Kyoto Kimpai"
|
||
3002 -> "Nakayama Kimpai"
|
||
3003 -> "Shinzan Kinen"
|
||
3004 -> "Fairy Stakes"
|
||
3005 -> "Aichi Hai"
|
||
3006 -> "Keisei Hai"
|
||
3007 -> "Silk Road Stakes"
|
||
3008 -> "Negishi Stakes"
|
||
3009 -> "Kisaragi Sho"
|
||
3010 -> "Tokyo Shimbun Hai"
|
||
3011 -> "Queen Cup"
|
||
3012 -> "Kyodo News Hai"
|
||
3013 -> "Kyoto Umamusume Stakes"
|
||
3014 -> "Diamond Stakes"
|
||
3015 -> "Kokura Daishoten"
|
||
3016 -> "Arlington Cup"
|
||
3017 -> "Hankyu Hai"
|
||
3018 -> "Tulip Sho"
|
||
3019 -> "Ocean Stakes"
|
||
3020 -> "Nakayama Umamusume Stakes"
|
||
3021 -> "Falcon Stakes"
|
||
3022 -> "Flower Cup"
|
||
3023 -> "Mainichi Hai"
|
||
3024 -> "March Stakes"
|
||
3025 -> "Lord Derby Challenge Trophy"
|
||
3026 -> "Antares Stakes"
|
||
3027 -> "Fukushima Umamusume Stakes"
|
||
3028 -> "Niigata Daishoten"
|
||
3029 -> "Heian Stakes"
|
||
3030 -> "Naruo Kinen"
|
||
3031 -> "Mermaid Stakes"
|
||
3032 -> "Epsom Cup"
|
||
3033 -> "Unicorn Stakes"
|
||
3034 -> "Hakodate Sprint Stakes"
|
||
3035 -> "CBC Sho"
|
||
3036 -> "Radio Nikkei Sho"
|
||
3037 -> "Procyon Stakes"
|
||
3038 -> "Tanabata Sho"
|
||
3039 -> "Hakodate Kinen"
|
||
3040 -> "Chukyo Kinen"
|
||
3041 -> "Hakodate Junior Stakes"
|
||
3042 -> "Ibis Summer Dash"
|
||
3043 -> "Queen Stakes"
|
||
3044 -> "Kokura Kinen"
|
||
3045 -> "Leopard Stakes"
|
||
3046 -> "Sekiya Kinen"
|
||
3047 -> "Elm Stakes"
|
||
3048 -> "Kitakyushu Kinen"
|
||
3049 -> "Niigata Junior Stakes"
|
||
3050 -> "Keeneland Cup"
|
||
3051 -> "Sapporo Junior Stakes"
|
||
3052 -> "Kokura Junior Stakes"
|
||
3053 -> "Niigata Kinen"
|
||
3054 -> "Shion Stakes"
|
||
3055 -> "Keisei Hai Autumn Handicap"
|
||
3056 -> "Sirius Stakes"
|
||
3057 -> "Saudi Arabia Royal Cup"
|
||
3058 -> "Fuji Stakes"
|
||
3059 -> "Artemis Stakes"
|
||
3060 -> "Fantasy Stakes"
|
||
3061 -> "Miyako Stakes"
|
||
3062 -> "Musashino Stakes"
|
||
3063 -> "Fukushima Kinen"
|
||
3064 -> "Tokyo Sports Hai Junior Stakes"
|
||
3065 -> "Kyoto Junior Stakes"
|
||
3066 -> "Keihan Hai"
|
||
3067 -> "Challenge Cup"
|
||
3068 -> "Chunichi Shimbun Hai"
|
||
3069 -> "Capella Stakes"
|
||
3070 -> "Turquoise Stakes"
|
||
4001 -> "Manyo Stakes"
|
||
4002 -> "Junior Cup"
|
||
4003 -> "Yodo Tankyori Stakes"
|
||
4004 -> "Pollux Stakes"
|
||
4005 -> "January Stakes"
|
||
4006 -> "New Year Stakes"
|
||
4007 -> "Kobai Stakes"
|
||
4008 -> "Subaru Stakes"
|
||
4009 -> "Wakagoma Stakes"
|
||
4010 -> "Carbuncle Stakes"
|
||
4011 -> "Shirafuji Stakes"
|
||
4012 -> "Crocus Stakes"
|
||
4013 -> "Yamato Stakes"
|
||
4014 -> "Elfin Stakes"
|
||
4015 -> "Rakuyo Stakes"
|
||
4016 -> "Aldebaran Stakes"
|
||
4017 -> "Valentine Stakes"
|
||
4018 -> "Hyacinth Stakes"
|
||
4019 -> "Sobu Stakes"
|
||
4020 -> "Sumire Stakes"
|
||
4021 -> "Osakajo Stakes"
|
||
4022 -> "Polaris Stakes"
|
||
4023 -> "Nigawa Stakes"
|
||
4024 -> "Anemone Stakes"
|
||
4025 -> "Shoryu Stakes"
|
||
4026 -> "Kochi Stakes"
|
||
4027 -> "Wakaba Stakes"
|
||
4028 -> "Chiba Stakes"
|
||
4030 -> "Rokko Stakes"
|
||
4031 -> "Coral Stakes"
|
||
4032 -> "Marguerite Stakes"
|
||
4033 -> "Fukuryu Stakes"
|
||
4035 -> "Wasurenagusa Sho"
|
||
4036 -> "Keiyo Stakes"
|
||
4037 -> "Shunrai Stakes"
|
||
4038 -> "Fukushima Mimpo Hai"
|
||
4039 -> "Tachibana Stakes"
|
||
4040 -> "Oasis Stakes"
|
||
4041 -> "Tennozan Stakes"
|
||
4042 -> "Tango Stakes"
|
||
4043 -> "Sweetpea Stakes"
|
||
4044 -> "Tanigawadake Stakes"
|
||
4045 -> "Principal Stakes"
|
||
4046 -> "Metropolitan Stakes"
|
||
4047 -> "Kurama Stakes"
|
||
4048 -> "Brilliant Stakes"
|
||
4049 -> "Miyakooji Stakes"
|
||
4050 -> "Aoi Stakes"
|
||
4051 -> "Ritto Stakes"
|
||
4052 -> "Seiryu Stakes"
|
||
4053 -> "May Stakes"
|
||
4054 -> "Hosu Stakes"
|
||
4055 -> "Idaten Stakes"
|
||
4056 -> "Shirayuri Stakes"
|
||
4057 -> "Keyaki Stakes"
|
||
4058 -> "Azuchijo Stakes"
|
||
4059 -> "Akhalteke Stakes"
|
||
4060 -> "Tempozan Stakes"
|
||
4061 -> "Yonago Stakes"
|
||
4062 -> "Onuma Stakes"
|
||
4063 -> "Paradise Stakes"
|
||
4064 -> "Tomoe Sho"
|
||
4065 -> "Marine Stakes"
|
||
4066 -> "Meitetsu Hai"
|
||
4068 -> "Chukyo Junior Stakes"
|
||
4069 -> "Fukushima TV Open"
|
||
4070 -> "Dahlia Sho"
|
||
4071 -> "Sapporo Nikkei Open"
|
||
4072 -> "UHB Sho"
|
||
4073 -> "Aso Stakes"
|
||
4074 -> "Phoenix Sho"
|
||
4075 -> "Cosmos Sho"
|
||
4076 -> "NST Sho"
|
||
4077 -> "Clover Sho"
|
||
4078 -> "Himawari Sho"
|
||
4079 -> "BSN Sho"
|
||
4080 -> "Kokura Nikkei Open"
|
||
4081 -> "Toki Stakes"
|
||
4082 -> "Tancho Stakes"
|
||
4083 -> "Suzuran Sho"
|
||
4084 -> "Enif Stakes"
|
||
4085 -> "Nojigiku Stakes"
|
||
4086 -> "Radio Nippon Sho"
|
||
4087 -> "Kikyo Stakes"
|
||
4088 -> "Fuyo Stakes"
|
||
4089 -> "Canna Stakes"
|
||
4090 -> "Port Island Stakes"
|
||
4091 -> "Opal Stakes"
|
||
4092 -> "Green Channel Cup"
|
||
4093 -> "Momiji Stakes"
|
||
4094 -> "October Stakes"
|
||
4095 -> "Shinetsu Stakes"
|
||
4096 -> "Ivy Stakes"
|
||
4097 -> "Muromachi Stakes"
|
||
4098 -> "Brazil Cup"
|
||
4099 -> "Hagi Stakes"
|
||
4100 -> "Cassiopeia Stakes"
|
||
4101 -> "Lumiere Autumn Dash"
|
||
4102 -> "Oro Cup"
|
||
4103 -> "Fukushima Junior Stakes"
|
||
4104 -> "Andromeda Stakes"
|
||
4105 -> "Shimotsuki Stakes"
|
||
4106 -> "Fukushima Minyu Cup"
|
||
4107 -> "Capital Stakes"
|
||
4108 -> "Autumn Leaf Stakes"
|
||
4109 -> "Lapis Lazuli Stakes"
|
||
4110 -> "Shiwasu Stakes"
|
||
4111 -> "Rigel Stakes"
|
||
4112 -> "Tanzanite Stakes"
|
||
4113 -> "December Stakes"
|
||
4114 -> "Christmas Rose Stakes"
|
||
4115 -> "Galaxy Stakes"
|
||
4116 -> "Betelgeuse Stakes"
|
||
4118 -> "Kitakyushu Tankyori Stakes"
|
||
4119 -> "Azumakofuji Stakes"
|
||
4120 -> "Sleipnir Stakes"
|
||
4121 -> "Sannomiya Stakes"
|
||
4122 -> "Kanetsu Stakes"
|
||
4123 -> "Nagatsuki Stakes"
|
||
4124 -> "Uzumasa Stakes"
|
||
4501 -> "Aster Sho"
|
||
4502 -> "Saffron Sho"
|
||
4503 -> "Rindo Sho"
|
||
4504 -> "Shigiku Sho"
|
||
4505 -> "Platanus Sho"
|
||
4506 -> "Nadeshiko Sho"
|
||
4507 -> "Hyakunichiso Tokubetsu"
|
||
4508 -> "Kimmokusei Tokubetsu"
|
||
4509 -> "Oxalis Sho"
|
||
4510 -> "Kigiku Sho"
|
||
4511 -> "Mochinoki Sho"
|
||
4512 -> "Akamatsu Sho"
|
||
4513 -> "Shumeigiku Sho"
|
||
4514 -> "Cattleya Sho"
|
||
4515 -> "Begonia Sho"
|
||
4516 -> "Shiragiku Sho"
|
||
4517 -> "Habotan Sho"
|
||
4518 -> "Koyamaki Sho"
|
||
4519 -> "Manryo Sho"
|
||
4520 -> "Kuromatsu Sho"
|
||
4521 -> "Erica Sho"
|
||
4522 -> "Tsuwabuki Sho"
|
||
4523 -> "Hiiragi Sho"
|
||
4524 -> "Sazanka Sho"
|
||
4525 -> "Kantsubaki Sho"
|
||
4526 -> "Senryo Sho"
|
||
x -> "race " ++ x.show
|
||
|
||
// Get the grade for a race.
|
||
// If no race matches the ID, the result is Pre-OP.
|
||
pub fun grade(r: race-id): grade
|
||
match r.game-id
|
||
1001 -> G1
|
||
1002 -> G1
|
||
1003 -> G1
|
||
1004 -> G1
|
||
1005 -> G1
|
||
1006 -> G1
|
||
1007 -> G1
|
||
1008 -> G1
|
||
1009 -> G1
|
||
1010 -> G1
|
||
1011 -> G1
|
||
1012 -> G1
|
||
1013 -> G1
|
||
1014 -> G1
|
||
1015 -> G1
|
||
1016 -> G1
|
||
1017 -> G1
|
||
1018 -> G1
|
||
1019 -> G1
|
||
1020 -> G1
|
||
1021 -> G1
|
||
1022 -> G1
|
||
1023 -> G1
|
||
1024 -> G1
|
||
1025 -> G1
|
||
1026 -> G1
|
||
1027 -> G1
|
||
1028 -> G1
|
||
1101 -> G1
|
||
1102 -> G1
|
||
1103 -> G1
|
||
1104 -> G1
|
||
1105 -> G1
|
||
1106 -> G1
|
||
2001 -> G2
|
||
2002 -> G2
|
||
2003 -> G2
|
||
2004 -> G2
|
||
2005 -> G2
|
||
2006 -> G2
|
||
2007 -> G2
|
||
2008 -> G2
|
||
2009 -> G2
|
||
2010 -> G2
|
||
2011 -> G2
|
||
2012 -> G2
|
||
2013 -> G2
|
||
2014 -> G2
|
||
2015 -> G2
|
||
2016 -> G2
|
||
2017 -> G2
|
||
2018 -> G2
|
||
2019 -> G2
|
||
2020 -> G2
|
||
2021 -> G2
|
||
2022 -> G2
|
||
2023 -> G2
|
||
2024 -> G2
|
||
2025 -> G2
|
||
2026 -> G2
|
||
2027 -> G2
|
||
2028 -> G2
|
||
2029 -> G2
|
||
2030 -> G2
|
||
2031 -> G2
|
||
2032 -> G2
|
||
2033 -> G2
|
||
2034 -> G2
|
||
2035 -> G2
|
||
3001 -> G3
|
||
3002 -> G3
|
||
3003 -> G3
|
||
3004 -> G3
|
||
3005 -> G3
|
||
3006 -> G3
|
||
3007 -> G3
|
||
3008 -> G3
|
||
3009 -> G3
|
||
3010 -> G3
|
||
3011 -> G3
|
||
3012 -> G3
|
||
3013 -> G3
|
||
3014 -> G3
|
||
3015 -> G3
|
||
3016 -> G3
|
||
3017 -> G3
|
||
3018 -> G2
|
||
3019 -> G3
|
||
3020 -> G3
|
||
3021 -> G3
|
||
3022 -> G3
|
||
3023 -> G3
|
||
3024 -> G3
|
||
3025 -> G3
|
||
3026 -> G3
|
||
3027 -> G3
|
||
3028 -> G3
|
||
3029 -> G3
|
||
3030 -> G3
|
||
3031 -> G3
|
||
3032 -> G3
|
||
3033 -> G3
|
||
3034 -> G3
|
||
3035 -> G3
|
||
3036 -> G3
|
||
3037 -> G3
|
||
3038 -> G3
|
||
3039 -> G3
|
||
3040 -> G3
|
||
3041 -> G3
|
||
3042 -> G3
|
||
3043 -> G3
|
||
3044 -> G3
|
||
3045 -> G3
|
||
3046 -> G3
|
||
3047 -> G3
|
||
3048 -> G3
|
||
3049 -> G3
|
||
3050 -> G3
|
||
3051 -> G3
|
||
3052 -> G3
|
||
3053 -> G3
|
||
3054 -> G3
|
||
3055 -> G3
|
||
3056 -> G3
|
||
3057 -> G3
|
||
3058 -> G2
|
||
3059 -> G3
|
||
3060 -> G3
|
||
3061 -> G3
|
||
3062 -> G3
|
||
3063 -> G3
|
||
3064 -> G3
|
||
3065 -> G3
|
||
3066 -> G3
|
||
3067 -> G3
|
||
3068 -> G3
|
||
3069 -> G3
|
||
3070 -> G3
|
||
4001 -> OP
|
||
4002 -> OP
|
||
4003 -> OP
|
||
4004 -> OP
|
||
4005 -> OP
|
||
4006 -> OP
|
||
4007 -> OP
|
||
4008 -> OP
|
||
4009 -> OP
|
||
4010 -> OP
|
||
4011 -> OP
|
||
4012 -> OP
|
||
4013 -> OP
|
||
4014 -> OP
|
||
4015 -> OP
|
||
4016 -> OP
|
||
4017 -> OP
|
||
4018 -> OP
|
||
4019 -> OP
|
||
4020 -> OP
|
||
4021 -> OP
|
||
4022 -> OP
|
||
4023 -> OP
|
||
4024 -> OP
|
||
4025 -> OP
|
||
4026 -> OP
|
||
4027 -> OP
|
||
4028 -> OP
|
||
4030 -> OP
|
||
4031 -> OP
|
||
4032 -> OP
|
||
4033 -> OP
|
||
4035 -> OP
|
||
4036 -> OP
|
||
4037 -> OP
|
||
4038 -> OP
|
||
4039 -> OP
|
||
4040 -> OP
|
||
4041 -> OP
|
||
4042 -> OP
|
||
4043 -> OP
|
||
4044 -> OP
|
||
4045 -> OP
|
||
4046 -> OP
|
||
4047 -> OP
|
||
4048 -> OP
|
||
4049 -> OP
|
||
4050 -> G3
|
||
4051 -> OP
|
||
4052 -> OP
|
||
4053 -> OP
|
||
4054 -> OP
|
||
4055 -> OP
|
||
4056 -> OP
|
||
4057 -> OP
|
||
4058 -> OP
|
||
4059 -> OP
|
||
4060 -> OP
|
||
4061 -> OP
|
||
4062 -> OP
|
||
4063 -> OP
|
||
4064 -> OP
|
||
4065 -> OP
|
||
4066 -> OP
|
||
4068 -> OP
|
||
4069 -> OP
|
||
4070 -> OP
|
||
4071 -> OP
|
||
4072 -> OP
|
||
4073 -> OP
|
||
4074 -> OP
|
||
4075 -> OP
|
||
4076 -> OP
|
||
4077 -> OP
|
||
4078 -> OP
|
||
4079 -> OP
|
||
4080 -> OP
|
||
4081 -> OP
|
||
4082 -> OP
|
||
4083 -> OP
|
||
4084 -> OP
|
||
4085 -> OP
|
||
4086 -> OP
|
||
4087 -> OP
|
||
4088 -> OP
|
||
4089 -> OP
|
||
4090 -> OP
|
||
4091 -> OP
|
||
4092 -> OP
|
||
4093 -> OP
|
||
4094 -> OP
|
||
4095 -> OP
|
||
4096 -> OP
|
||
4097 -> OP
|
||
4098 -> OP
|
||
4099 -> OP
|
||
4100 -> OP
|
||
4101 -> OP
|
||
4102 -> OP
|
||
4103 -> OP
|
||
4104 -> OP
|
||
4105 -> OP
|
||
4106 -> OP
|
||
4107 -> OP
|
||
4108 -> OP
|
||
4109 -> OP
|
||
4110 -> OP
|
||
4111 -> OP
|
||
4112 -> OP
|
||
4113 -> OP
|
||
4114 -> OP
|
||
4115 -> OP
|
||
4116 -> OP
|
||
4118 -> OP
|
||
4119 -> OP
|
||
4120 -> OP
|
||
4121 -> OP
|
||
4122 -> OP
|
||
4123 -> OP
|
||
4124 -> OP
|
||
4501 -> Pre-OP
|
||
4502 -> Pre-OP
|
||
4503 -> Pre-OP
|
||
4504 -> Pre-OP
|
||
4505 -> Pre-OP
|
||
4506 -> Pre-OP
|
||
4507 -> Pre-OP
|
||
4508 -> Pre-OP
|
||
4509 -> Pre-OP
|
||
4510 -> Pre-OP
|
||
4511 -> Pre-OP
|
||
4512 -> Pre-OP
|
||
4513 -> Pre-OP
|
||
4514 -> Pre-OP
|
||
4515 -> Pre-OP
|
||
4516 -> Pre-OP
|
||
4517 -> Pre-OP
|
||
4518 -> Pre-OP
|
||
4519 -> Pre-OP
|
||
4520 -> Pre-OP
|
||
4521 -> Pre-OP
|
||
4522 -> Pre-OP
|
||
4523 -> Pre-OP
|
||
4524 -> Pre-OP
|
||
4525 -> Pre-OP
|
||
4526 -> Pre-OP
|
||
_ -> Pre-OP
|
||
|
||
// Get the thumbnail ID for a race.
|
||
// If no race matches the ID, the result is an invalid ID.
|
||
pub fun thumbnail(r: race-id): race-thumbnail-id
|
||
match r.game-id
|
||
1001 -> Race-thumbnail-id(1001)
|
||
1002 -> Race-thumbnail-id(1002)
|
||
1003 -> Race-thumbnail-id(1003)
|
||
1004 -> Race-thumbnail-id(1004)
|
||
1005 -> Race-thumbnail-id(1005)
|
||
1006 -> Race-thumbnail-id(1006)
|
||
1007 -> Race-thumbnail-id(1007)
|
||
1008 -> Race-thumbnail-id(1008)
|
||
1009 -> Race-thumbnail-id(1009)
|
||
1010 -> Race-thumbnail-id(1010)
|
||
1011 -> Race-thumbnail-id(1011)
|
||
1012 -> Race-thumbnail-id(1012)
|
||
1013 -> Race-thumbnail-id(1013)
|
||
1014 -> Race-thumbnail-id(1014)
|
||
1015 -> Race-thumbnail-id(1015)
|
||
1016 -> Race-thumbnail-id(1016)
|
||
1017 -> Race-thumbnail-id(1017)
|
||
1018 -> Race-thumbnail-id(1018)
|
||
1019 -> Race-thumbnail-id(1019)
|
||
1020 -> Race-thumbnail-id(1020)
|
||
1021 -> Race-thumbnail-id(1021)
|
||
1022 -> Race-thumbnail-id(1022)
|
||
1023 -> Race-thumbnail-id(1023)
|
||
1024 -> Race-thumbnail-id(1024)
|
||
1025 -> Race-thumbnail-id(1012)
|
||
1026 -> Race-thumbnail-id(1015)
|
||
1027 -> Race-thumbnail-id(1027)
|
||
1028 -> Race-thumbnail-id(1028)
|
||
1101 -> Race-thumbnail-id(1101)
|
||
1102 -> Race-thumbnail-id(1102)
|
||
1103 -> Race-thumbnail-id(1103)
|
||
1104 -> Race-thumbnail-id(1104)
|
||
1105 -> Race-thumbnail-id(1105)
|
||
1106 -> Race-thumbnail-id(1106)
|
||
2001 -> Race-thumbnail-id(2001)
|
||
2002 -> Race-thumbnail-id(2002)
|
||
2003 -> Race-thumbnail-id(2003)
|
||
2004 -> Race-thumbnail-id(2004)
|
||
2005 -> Race-thumbnail-id(2005)
|
||
2006 -> Race-thumbnail-id(2006)
|
||
2007 -> Race-thumbnail-id(2007)
|
||
2008 -> Race-thumbnail-id(2008)
|
||
2009 -> Race-thumbnail-id(2009)
|
||
2010 -> Race-thumbnail-id(2010)
|
||
2011 -> Race-thumbnail-id(2011)
|
||
2012 -> Race-thumbnail-id(2012)
|
||
2013 -> Race-thumbnail-id(2013)
|
||
2014 -> Race-thumbnail-id(2014)
|
||
2015 -> Race-thumbnail-id(2015)
|
||
2016 -> Race-thumbnail-id(2016)
|
||
2017 -> Race-thumbnail-id(2017)
|
||
2018 -> Race-thumbnail-id(2018)
|
||
2019 -> Race-thumbnail-id(2019)
|
||
2020 -> Race-thumbnail-id(2020)
|
||
2021 -> Race-thumbnail-id(2021)
|
||
2022 -> Race-thumbnail-id(2022)
|
||
2023 -> Race-thumbnail-id(2023)
|
||
2024 -> Race-thumbnail-id(2024)
|
||
2025 -> Race-thumbnail-id(2025)
|
||
2026 -> Race-thumbnail-id(2026)
|
||
2027 -> Race-thumbnail-id(2027)
|
||
2028 -> Race-thumbnail-id(2028)
|
||
2029 -> Race-thumbnail-id(2029)
|
||
2030 -> Race-thumbnail-id(2030)
|
||
2031 -> Race-thumbnail-id(2031)
|
||
2032 -> Race-thumbnail-id(2032)
|
||
2033 -> Race-thumbnail-id(2033)
|
||
2034 -> Race-thumbnail-id(2034)
|
||
2035 -> Race-thumbnail-id(2010)
|
||
3001 -> Race-thumbnail-id(3001)
|
||
3002 -> Race-thumbnail-id(3002)
|
||
3003 -> Race-thumbnail-id(3003)
|
||
3004 -> Race-thumbnail-id(3004)
|
||
3005 -> Race-thumbnail-id(3005)
|
||
3006 -> Race-thumbnail-id(3006)
|
||
3007 -> Race-thumbnail-id(3007)
|
||
3008 -> Race-thumbnail-id(3008)
|
||
3009 -> Race-thumbnail-id(3009)
|
||
3010 -> Race-thumbnail-id(3010)
|
||
3011 -> Race-thumbnail-id(3011)
|
||
3012 -> Race-thumbnail-id(3012)
|
||
3013 -> Race-thumbnail-id(3013)
|
||
3014 -> Race-thumbnail-id(3014)
|
||
3015 -> Race-thumbnail-id(3015)
|
||
3016 -> Race-thumbnail-id(3016)
|
||
3017 -> Race-thumbnail-id(3017)
|
||
3018 -> Race-thumbnail-id(3018)
|
||
3019 -> Race-thumbnail-id(3019)
|
||
3020 -> Race-thumbnail-id(3020)
|
||
3021 -> Race-thumbnail-id(3021)
|
||
3022 -> Race-thumbnail-id(3022)
|
||
3023 -> Race-thumbnail-id(3023)
|
||
3024 -> Race-thumbnail-id(3024)
|
||
3025 -> Race-thumbnail-id(3025)
|
||
3026 -> Race-thumbnail-id(3026)
|
||
3027 -> Race-thumbnail-id(3027)
|
||
3028 -> Race-thumbnail-id(3028)
|
||
3029 -> Race-thumbnail-id(3029)
|
||
3030 -> Race-thumbnail-id(3030)
|
||
3031 -> Race-thumbnail-id(3031)
|
||
3032 -> Race-thumbnail-id(3032)
|
||
3033 -> Race-thumbnail-id(3033)
|
||
3034 -> Race-thumbnail-id(3034)
|
||
3035 -> Race-thumbnail-id(3035)
|
||
3036 -> Race-thumbnail-id(3036)
|
||
3037 -> Race-thumbnail-id(3037)
|
||
3038 -> Race-thumbnail-id(3038)
|
||
3039 -> Race-thumbnail-id(3039)
|
||
3040 -> Race-thumbnail-id(3040)
|
||
3041 -> Race-thumbnail-id(3041)
|
||
3042 -> Race-thumbnail-id(3042)
|
||
3043 -> Race-thumbnail-id(3043)
|
||
3044 -> Race-thumbnail-id(3044)
|
||
3045 -> Race-thumbnail-id(3045)
|
||
3046 -> Race-thumbnail-id(3046)
|
||
3047 -> Race-thumbnail-id(3047)
|
||
3048 -> Race-thumbnail-id(3048)
|
||
3049 -> Race-thumbnail-id(3049)
|
||
3050 -> Race-thumbnail-id(3050)
|
||
3051 -> Race-thumbnail-id(3051)
|
||
3052 -> Race-thumbnail-id(3052)
|
||
3053 -> Race-thumbnail-id(3053)
|
||
3054 -> Race-thumbnail-id(3054)
|
||
3055 -> Race-thumbnail-id(3055)
|
||
3056 -> Race-thumbnail-id(3056)
|
||
3057 -> Race-thumbnail-id(3057)
|
||
3058 -> Race-thumbnail-id(3058)
|
||
3059 -> Race-thumbnail-id(3059)
|
||
3060 -> Race-thumbnail-id(3060)
|
||
3061 -> Race-thumbnail-id(3061)
|
||
3062 -> Race-thumbnail-id(3062)
|
||
3063 -> Race-thumbnail-id(3063)
|
||
3064 -> Race-thumbnail-id(3064)
|
||
3065 -> Race-thumbnail-id(3065)
|
||
3066 -> Race-thumbnail-id(3066)
|
||
3067 -> Race-thumbnail-id(3067)
|
||
3068 -> Race-thumbnail-id(3068)
|
||
3069 -> Race-thumbnail-id(3069)
|
||
3070 -> Race-thumbnail-id(3070)
|
||
4001 -> Race-thumbnail-id(4001)
|
||
4002 -> Race-thumbnail-id(4002)
|
||
4003 -> Race-thumbnail-id(4003)
|
||
4004 -> Race-thumbnail-id(4004)
|
||
4005 -> Race-thumbnail-id(4005)
|
||
4006 -> Race-thumbnail-id(4006)
|
||
4007 -> Race-thumbnail-id(4007)
|
||
4008 -> Race-thumbnail-id(4008)
|
||
4009 -> Race-thumbnail-id(4009)
|
||
4010 -> Race-thumbnail-id(4010)
|
||
4011 -> Race-thumbnail-id(4011)
|
||
4012 -> Race-thumbnail-id(4012)
|
||
4013 -> Race-thumbnail-id(4013)
|
||
4014 -> Race-thumbnail-id(4014)
|
||
4015 -> Race-thumbnail-id(4015)
|
||
4016 -> Race-thumbnail-id(4016)
|
||
4017 -> Race-thumbnail-id(4017)
|
||
4018 -> Race-thumbnail-id(4018)
|
||
4019 -> Race-thumbnail-id(4019)
|
||
4020 -> Race-thumbnail-id(4020)
|
||
4021 -> Race-thumbnail-id(4021)
|
||
4022 -> Race-thumbnail-id(4022)
|
||
4023 -> Race-thumbnail-id(4023)
|
||
4024 -> Race-thumbnail-id(4024)
|
||
4025 -> Race-thumbnail-id(4025)
|
||
4026 -> Race-thumbnail-id(4026)
|
||
4027 -> Race-thumbnail-id(4027)
|
||
4028 -> Race-thumbnail-id(4028)
|
||
4030 -> Race-thumbnail-id(4030)
|
||
4031 -> Race-thumbnail-id(4031)
|
||
4032 -> Race-thumbnail-id(4032)
|
||
4033 -> Race-thumbnail-id(4033)
|
||
4035 -> Race-thumbnail-id(4035)
|
||
4036 -> Race-thumbnail-id(4036)
|
||
4037 -> Race-thumbnail-id(4037)
|
||
4038 -> Race-thumbnail-id(4038)
|
||
4039 -> Race-thumbnail-id(4039)
|
||
4040 -> Race-thumbnail-id(4040)
|
||
4041 -> Race-thumbnail-id(4041)
|
||
4042 -> Race-thumbnail-id(4042)
|
||
4043 -> Race-thumbnail-id(4043)
|
||
4044 -> Race-thumbnail-id(4044)
|
||
4045 -> Race-thumbnail-id(4045)
|
||
4046 -> Race-thumbnail-id(4046)
|
||
4047 -> Race-thumbnail-id(4047)
|
||
4048 -> Race-thumbnail-id(4048)
|
||
4049 -> Race-thumbnail-id(4049)
|
||
4050 -> Race-thumbnail-id(4050)
|
||
4051 -> Race-thumbnail-id(4051)
|
||
4052 -> Race-thumbnail-id(4052)
|
||
4053 -> Race-thumbnail-id(4053)
|
||
4054 -> Race-thumbnail-id(4054)
|
||
4055 -> Race-thumbnail-id(4055)
|
||
4056 -> Race-thumbnail-id(4056)
|
||
4057 -> Race-thumbnail-id(4057)
|
||
4058 -> Race-thumbnail-id(4058)
|
||
4059 -> Race-thumbnail-id(4059)
|
||
4060 -> Race-thumbnail-id(4060)
|
||
4061 -> Race-thumbnail-id(4061)
|
||
4062 -> Race-thumbnail-id(4062)
|
||
4063 -> Race-thumbnail-id(4063)
|
||
4064 -> Race-thumbnail-id(4064)
|
||
4065 -> Race-thumbnail-id(4065)
|
||
4066 -> Race-thumbnail-id(4066)
|
||
4068 -> Race-thumbnail-id(4068)
|
||
4069 -> Race-thumbnail-id(4069)
|
||
4070 -> Race-thumbnail-id(4070)
|
||
4071 -> Race-thumbnail-id(4071)
|
||
4072 -> Race-thumbnail-id(4072)
|
||
4073 -> Race-thumbnail-id(4073)
|
||
4074 -> Race-thumbnail-id(4074)
|
||
4075 -> Race-thumbnail-id(4075)
|
||
4076 -> Race-thumbnail-id(4076)
|
||
4077 -> Race-thumbnail-id(4077)
|
||
4078 -> Race-thumbnail-id(4078)
|
||
4079 -> Race-thumbnail-id(4079)
|
||
4080 -> Race-thumbnail-id(4080)
|
||
4081 -> Race-thumbnail-id(4081)
|
||
4082 -> Race-thumbnail-id(4082)
|
||
4083 -> Race-thumbnail-id(4083)
|
||
4084 -> Race-thumbnail-id(4084)
|
||
4085 -> Race-thumbnail-id(4085)
|
||
4086 -> Race-thumbnail-id(4086)
|
||
4087 -> Race-thumbnail-id(4087)
|
||
4088 -> Race-thumbnail-id(4088)
|
||
4089 -> Race-thumbnail-id(4089)
|
||
4090 -> Race-thumbnail-id(4090)
|
||
4091 -> Race-thumbnail-id(4091)
|
||
4092 -> Race-thumbnail-id(4092)
|
||
4093 -> Race-thumbnail-id(4093)
|
||
4094 -> Race-thumbnail-id(4094)
|
||
4095 -> Race-thumbnail-id(4095)
|
||
4096 -> Race-thumbnail-id(4096)
|
||
4097 -> Race-thumbnail-id(4097)
|
||
4098 -> Race-thumbnail-id(4098)
|
||
4099 -> Race-thumbnail-id(4099)
|
||
4100 -> Race-thumbnail-id(4100)
|
||
4101 -> Race-thumbnail-id(4101)
|
||
4102 -> Race-thumbnail-id(4102)
|
||
4103 -> Race-thumbnail-id(4103)
|
||
4104 -> Race-thumbnail-id(4104)
|
||
4105 -> Race-thumbnail-id(4105)
|
||
4106 -> Race-thumbnail-id(4106)
|
||
4107 -> Race-thumbnail-id(4107)
|
||
4108 -> Race-thumbnail-id(4108)
|
||
4109 -> Race-thumbnail-id(4109)
|
||
4110 -> Race-thumbnail-id(4110)
|
||
4111 -> Race-thumbnail-id(4111)
|
||
4112 -> Race-thumbnail-id(4112)
|
||
4113 -> Race-thumbnail-id(4113)
|
||
4114 -> Race-thumbnail-id(4114)
|
||
4115 -> Race-thumbnail-id(4115)
|
||
4116 -> Race-thumbnail-id(4116)
|
||
4118 -> Race-thumbnail-id(4117)
|
||
4119 -> Race-thumbnail-id(4118)
|
||
4120 -> Race-thumbnail-id(4119)
|
||
4121 -> Race-thumbnail-id(4120)
|
||
4122 -> Race-thumbnail-id(4121)
|
||
4123 -> Race-thumbnail-id(4122)
|
||
4124 -> Race-thumbnail-id(4123)
|
||
4501 -> Race-thumbnail-id(4501)
|
||
4502 -> Race-thumbnail-id(4502)
|
||
4503 -> Race-thumbnail-id(4503)
|
||
4504 -> Race-thumbnail-id(4504)
|
||
4505 -> Race-thumbnail-id(4505)
|
||
4506 -> Race-thumbnail-id(4506)
|
||
4507 -> Race-thumbnail-id(4507)
|
||
4508 -> Race-thumbnail-id(4508)
|
||
4509 -> Race-thumbnail-id(4509)
|
||
4510 -> Race-thumbnail-id(4510)
|
||
4511 -> Race-thumbnail-id(4511)
|
||
4512 -> Race-thumbnail-id(4512)
|
||
4513 -> Race-thumbnail-id(4513)
|
||
4514 -> Race-thumbnail-id(4514)
|
||
4515 -> Race-thumbnail-id(4515)
|
||
4516 -> Race-thumbnail-id(4516)
|
||
4517 -> Race-thumbnail-id(4517)
|
||
4518 -> Race-thumbnail-id(4518)
|
||
4519 -> Race-thumbnail-id(4519)
|
||
4520 -> Race-thumbnail-id(4520)
|
||
4521 -> Race-thumbnail-id(4521)
|
||
4522 -> Race-thumbnail-id(4522)
|
||
4523 -> Race-thumbnail-id(4523)
|
||
4524 -> Race-thumbnail-id(4524)
|
||
4525 -> Race-thumbnail-id(4525)
|
||
4526 -> Race-thumbnail-id(4526)
|
||
_ -> Race-thumbnail-id(0)
|
||
|
||
// Get the primary ID for a race.
|
||
// For races which are the primary version, or if no race matches the given ID,
|
||
// the result is the input.
|
||
pub fun primary(r: race-id): race-id
|
||
match r.game-id
|
||
1025 -> Race-id(1012)
|
||
1026 -> Race-id(1015)
|
||
1027 -> Race-id(1006)
|
||
1028 -> Race-id(1005)
|
||
2035 -> Race-id(2010)
|
||
_ -> r
|