249 lines
7.5 KiB
Python
249 lines
7.5 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
RED = 'r'
|
|
BLUE = 'b'
|
|
GREEN = 'g'
|
|
YELLOW = 'y'
|
|
COLORS = (RED, BLUE, GREEN, YELLOW)
|
|
|
|
# Special cards
|
|
CHOOSE = 'colorchooser'
|
|
DRAW_FOUR = 'draw_four'
|
|
SPECIALS = (CHOOSE, DRAW_FOUR)
|
|
|
|
_ALL = {
|
|
"STICKERS": {
|
|
"b_0": 43161736970240473,
|
|
"b_1": 43161736970240475,
|
|
"b_2": 43161736970240477,
|
|
"b_3": 43161736970240479,
|
|
"b_4": 43161736970240481,
|
|
"b_5": 43161736970240483,
|
|
"b_6": 43161736970240485,
|
|
"b_7": 43161736970240487,
|
|
"b_8": 43161736970240489,
|
|
"b_9": 43161736970240491,
|
|
"b_draw": 43161736970240493,
|
|
"b_skip": 43161736970240497,
|
|
"b_reverse": 43161736970240495,
|
|
"g_0": 43161736970240503,
|
|
"g_1": 43161736970240505,
|
|
"g_2": 43161736970240507,
|
|
"g_3": 43161736970240509,
|
|
"g_4": 43161736970240511,
|
|
"g_5": 43161736970240513,
|
|
"g_6": 43161736970240515,
|
|
"g_7": 43161736970240517,
|
|
"g_8": 43161736970240519,
|
|
"g_9": 43161736970240521,
|
|
"g_draw": 43161736970240523,
|
|
"g_skip": 43161736970240527,
|
|
"g_reverse": 43161736970240525,
|
|
"r_0": 43161736970240529,
|
|
"r_1": 43161736970240531,
|
|
"r_2": 43161736970240533,
|
|
"r_3": 43161736970240535,
|
|
"r_4": 43161736970240537,
|
|
"r_5": 43161736970240539,
|
|
"r_6": 43161736970240541,
|
|
"r_7": 43161736970240543,
|
|
"r_8": 43161736970240545,
|
|
"r_9": 43161736970240547,
|
|
"r_draw": 43161736970240549,
|
|
"r_skip": 43161736970240553,
|
|
"r_reverse": 43161736970240551,
|
|
"y_0": 43161736970240555,
|
|
"y_1": 43161736970240557,
|
|
"y_2": 43161736970240559,
|
|
"y_3": 43161736970240561,
|
|
"y_4": 43161736970240563,
|
|
"y_5": 43161736970240565,
|
|
"y_6": 43161736970240567,
|
|
"y_7": 43161736970240569,
|
|
"y_8": 43161736970240571,
|
|
"y_9": 43161736970240573,
|
|
"y_draw": 43161736970240575,
|
|
"y_skip": 43161736970240579,
|
|
"y_reverse": 43161736970240577,
|
|
"draw_four": 43161736970240501,
|
|
"colorchooser": 43161736970240499
|
|
},
|
|
"STICKERS_GREY": {
|
|
"b_0": 43161736970240581,
|
|
"b_1": 43161736970240583,
|
|
"b_2": 43161736970240585,
|
|
"b_3": 43161736970240587,
|
|
"b_4": 43161736970240589,
|
|
"b_5": 43161736970240591,
|
|
"b_6": 43161736970240593,
|
|
"b_7": 43161736970240595,
|
|
"b_8": 43161736970240597,
|
|
"b_9": 43161736970240599,
|
|
"b_draw": 43161736970240601,
|
|
"b_skip": 43161736970240605,
|
|
"b_reverse": 43161736970240603,
|
|
"g_0": 43161736970240611,
|
|
"g_1": 43161736970240613,
|
|
"g_2": 43161736970240615,
|
|
"g_3": 43161736970240617,
|
|
"g_4": 43161736970240619,
|
|
"g_5": 43161736970240621,
|
|
"g_6": 43161736970240623,
|
|
"g_7": 43161736970240625,
|
|
"g_8": 43161736970240627,
|
|
"g_9": 43161736970240629,
|
|
"g_draw": 43161736970240631,
|
|
"g_skip": 43161736970240635,
|
|
"g_reverse": 43161736970240633,
|
|
"r_0": 43161736970240637,
|
|
"r_1": 43161736970240639,
|
|
"r_2": 43161736970240641,
|
|
"r_3": 43161736970240643,
|
|
"r_4": 43161736970240645,
|
|
"r_5": 43161736970240647,
|
|
"r_6": 43161736970240649,
|
|
"r_7": 43161736970240651,
|
|
"r_8": 43161736970240653,
|
|
"r_9": 43161736970240655,
|
|
"r_draw": 43161736970240657,
|
|
"r_skip": 43161736970240661,
|
|
"r_reverse": 43161736970240659,
|
|
"y_0": 43161736970240663,
|
|
"y_1": 43161736970240665,
|
|
"y_2": 43161736970240667,
|
|
"y_3": 43161736970240669,
|
|
"y_4": 43161736970240671,
|
|
"y_5": 43161736970240673,
|
|
"y_6": 43161736970240675,
|
|
"y_7": 43161736970240677,
|
|
"y_8": 43161736970240679,
|
|
"y_9": 43161736970240681,
|
|
"y_draw": 43161736970240683,
|
|
"y_skip": 43161736970240687,
|
|
"y_reverse": 43161736970240685,
|
|
"draw_four": 43161736970240609,
|
|
"colorchooser": 43161736970240607
|
|
},
|
|
"CB_STICKERS": {
|
|
"colorchooser": 5880002320636317358,
|
|
"draw_four": 5879982271728980065,
|
|
"r_0": 5877721426714169320,
|
|
"r_1": 5879880386514783717,
|
|
"r_2": 5879770246373445078,
|
|
"r_3": 5879933837382783126,
|
|
"r_4": 5877760081419835913,
|
|
"r_5": 5879900358112710487,
|
|
"r_6": 5877642725733436957,
|
|
"r_7": 5877749137843162933,
|
|
"r_8": 5877483266482639060,
|
|
"r_9": 5877311506445504217,
|
|
"r_draw": 5877319172962127805,
|
|
"r_reverse": 5879797923142701285,
|
|
"r_skip": 5879761158222646854,
|
|
"g_0": 5879503756537630286,
|
|
"g_1": 5879484605278457410,
|
|
"g_2": 5879660312390538712,
|
|
"g_3": 5879657340273168039,
|
|
"g_4": 5877333445138452550,
|
|
"g_5": 5879673223062228738,
|
|
"g_6": 5879937299126425174,
|
|
"g_7": 5879480885836780249,
|
|
"g_8": 5879703210523888872,
|
|
"g_9": 5879841577190297875,
|
|
"g_draw": 5879828352985993092,
|
|
"g_reverse": 5879536127706140722,
|
|
"g_skip": 5877663328691558252,
|
|
"b_0": 5877474899886346488,
|
|
"b_1": 5879595475564237681,
|
|
"b_2": 5879838149806396627,
|
|
"b_3": 5879644472551148854,
|
|
"b_4": 5879829976483630741,
|
|
"b_5": 5880005537566821550,
|
|
"b_6": 5879891184062567694,
|
|
"b_7": 5879693400818585891,
|
|
"b_8": 5877543314420403675,
|
|
"b_9": 5879815124486720957,
|
|
"b_draw": 5877337362148626071,
|
|
"b_reverse": 5879952477540847522,
|
|
"b_skip": 5879687933325217017,
|
|
"y_0": 5879826162552671917,
|
|
"y_1": 5879882976380063602,
|
|
"y_2": 5879670177930415760,
|
|
"y_3": 5879704855496363257,
|
|
"y_4": 5879532202106031757,
|
|
"y_5": 5879476148487851945,
|
|
"y_6": 5879621820893629813,
|
|
"y_7": 5879449949187345641,
|
|
"y_8": 5877679301674930177,
|
|
"y_9": 5879515370129198532,
|
|
"y_draw": 5879758787400699599,
|
|
"y_reverse": 5879737007621541967,
|
|
"y_skip": 5877368079754729022
|
|
},
|
|
"CB_STICKERS_GREY": {
|
|
"colorchooser": 5879664091961757349,
|
|
"draw_four": 5879690097988735793,
|
|
"r_0": 5877371103411704752,
|
|
"r_1": 5877302078992289364,
|
|
"r_2": 5879920475739524527,
|
|
"r_3": 5877448455772705743,
|
|
"r_4": 5877436661792509909,
|
|
"r_5": 5877206279746752859,
|
|
"r_6": 5879858589555757822,
|
|
"r_7": 5879564526029902234,
|
|
"r_8": 5879894658691108279,
|
|
"r_9": 5879865895295127863,
|
|
"r_draw": 5877318610321412183,
|
|
"r_reverse": 5880000104433193795,
|
|
"r_skip": 5877425756870544996,
|
|
"g_0": 5879665023969660659,
|
|
"g_1": 5879945807456636378,
|
|
"g_2": 5879827012956197138,
|
|
"g_3": 5879609584531804090,
|
|
"g_4": 5877240360312246189,
|
|
"g_5": 5877455293360640086,
|
|
"g_6": 5879591305150992178,
|
|
"g_7": 5877481174833566141,
|
|
"g_8": 5877624205834456665,
|
|
"g_9": 5879594152714311387,
|
|
"g_draw": 5877599861959822892,
|
|
"g_reverse": 5879475796300532820,
|
|
"g_skip": 5879569061515365986,
|
|
"b_0": 5877424945121727831,
|
|
"b_1": 5877244191423074517,
|
|
"b_2": 5879753839598374502,
|
|
"b_3": 5880000465210445948,
|
|
"b_4": 5879663598040518716,
|
|
"b_5": 5879889964291853901,
|
|
"b_6": 5879767643623264510,
|
|
"b_7": 5877307168528535701,
|
|
"b_8": 5879524471164899173,
|
|
"b_9": 5879799864467919022,
|
|
"b_draw": 5879549871601487285,
|
|
"b_reverse": 5879465080357130570,
|
|
"b_skip": 5879806680581018111,
|
|
"y_0": 5879699624226197743,
|
|
"y_1": 5879640207648623653,
|
|
"y_2": 5879913706871066164,
|
|
"y_3": 5879537051124109020,
|
|
"y_4": 5877545436134248386,
|
|
"y_5": 5879513377264374502,
|
|
"y_6": 5879961466907398077,
|
|
"y_7": 5879549613903449302,
|
|
"y_8": 5877716118134591342,
|
|
"y_9": 5877734590788931385,
|
|
"y_draw": 5879740731358187243,
|
|
"y_reverse": 5879596270133186486,
|
|
"y_skip": 5879469203525734731
|
|
},
|
|
"STICKERS_SET": 43161736970240002,
|
|
"STICKERS_GREY_SET": 43161736970240002,
|
|
"CB_STICKERS_SET": 43161736970240012,
|
|
"CB_STICKERS_GREY_SET": 43161736970240013
|
|
}
|
|
|
|
# only grey ordinary cards are useful
|
|
GREY_ID = {
|
|
_ALL["STICKERS_GREY_SET"]: {v: k for k, v in _ALL["STICKERS_GREY"].items()},
|
|
_ALL["CB_STICKERS_GREY_SET"]: {v: k for k, v in _ALL["CB_STICKERS_GREY"].items()},
|
|
}
|