cardpack 0.6.11

Generic Deck of Cards
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
use crate::basic::types::basic_card::BasicCard;
use crate::basic::types::pips::{Pip, PipType};

pub struct TarotBasicCard;
pub struct TarotSuit;
pub struct TarotRank;

pub const FLUENT_KEY_BASE_NAME_TAROT: &str = "tarot";

impl TarotBasicCard {
    pub const FOOL: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::FOOL,
    };
    pub const MAGICIAN: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::MAGICIAN,
    };
    pub const HIGH_PRIESTESS: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::HIGH_PRIESTESS,
    };
    pub const EMPRESS: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::EMPRESS,
    };
    pub const EMPEROR: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::EMPEROR,
    };
    pub const HIEROPHANT: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::HIEROPHANT,
    };
    pub const LOVERS: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::LOVERS,
    };
    pub const CHARIOT: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::CHARIOT,
    };
    pub const STRENGTH: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::STRENGTH,
    };
    pub const HERMIT: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::HERMIT,
    };
    pub const WHEEL_OF_FORTUNE: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::WHEEL_OF_FORTUNE,
    };
    pub const JUSTICE: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::JUSTICE,
    };
    pub const HANGED_MAN: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::HANGED_MAN,
    };
    pub const DEATH: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::DEATH,
    };
    pub const TEMPERANCE: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::TEMPERANCE,
    };
    pub const DEVIL: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::DEVIL,
    };
    pub const TOWER: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::TOWER,
    };
    pub const STAR: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::STAR,
    };
    pub const MOON: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::MOON,
    };
    pub const SUN: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::SUN,
    };
    pub const JUDGEMENT: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::JUDGEMENT,
    };
    pub const WORLD: BasicCard = BasicCard {
        suit: TarotSuit::MAJOR_ARCANA,
        rank: TarotRank::WORLD,
    };

    pub const KING_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::KING,
    };
    pub const QUEEN_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::QUEEN,
    };
    pub const KNIGHT_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::KNIGHT,
    };
    pub const PAGE_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::PAGE,
    };
    pub const TEN_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::TEN,
    };
    pub const NINE_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::NINE,
    };
    pub const EIGHT_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::EIGHT,
    };
    pub const SEVEN_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::SEVEN,
    };
    pub const SIX_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::SIX,
    };
    pub const FIVE_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::FIVE,
    };
    pub const FOUR_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::FOUR,
    };
    pub const THREE_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::THREE,
    };
    pub const TWO_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::TWO,
    };
    pub const ACE_WANDS: BasicCard = BasicCard {
        suit: TarotSuit::WANDS,
        rank: TarotRank::ACE,
    };
    pub const KING_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::KING,
    };
    pub const QUEEN_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::QUEEN,
    };
    pub const KNIGHT_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::KNIGHT,
    };
    pub const PAGE_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::PAGE,
    };
    pub const TEN_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::TEN,
    };
    pub const NINE_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::NINE,
    };
    pub const EIGHT_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::EIGHT,
    };
    pub const SEVEN_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::SEVEN,
    };
    pub const SIX_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::SIX,
    };
    pub const FIVE_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::FIVE,
    };
    pub const FOUR_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::FOUR,
    };
    pub const THREE_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::THREE,
    };
    pub const TWO_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::TWO,
    };
    pub const ACE_CUPS: BasicCard = BasicCard {
        suit: TarotSuit::CUPS,
        rank: TarotRank::ACE,
    };
    pub const KING_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::KING,
    };
    pub const QUEEN_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::QUEEN,
    };
    pub const KNIGHT_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::KNIGHT,
    };
    pub const PAGE_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::PAGE,
    };
    pub const TEN_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::TEN,
    };
    pub const NINE_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::NINE,
    };
    pub const EIGHT_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::EIGHT,
    };
    pub const SEVEN_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::SEVEN,
    };
    pub const SIX_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::SIX,
    };
    pub const FIVE_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::FIVE,
    };
    pub const FOUR_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::FOUR,
    };
    pub const THREE_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::THREE,
    };
    pub const TWO_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::TWO,
    };
    pub const ACE_SWORDS: BasicCard = BasicCard {
        suit: TarotSuit::SWORDS,
        rank: TarotRank::ACE,
    };
    pub const KING_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::KING,
    };
    pub const QUEEN_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::QUEEN,
    };
    pub const KNIGHT_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::KNIGHT,
    };
    pub const PAGE_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::PAGE,
    };
    pub const TEN_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::TEN,
    };
    pub const NINE_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::NINE,
    };
    pub const EIGHT_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::EIGHT,
    };
    pub const SEVEN_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::SEVEN,
    };
    pub const SIX_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::SIX,
    };
    pub const FIVE_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::FIVE,
    };
    pub const FOUR_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::FOUR,
    };
    pub const THREE_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::THREE,
    };
    pub const TWO_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::TWO,
    };
    pub const ACE_PENTACLES: BasicCard = BasicCard {
        suit: TarotSuit::PENTACLES,
        rank: TarotRank::ACE,
    };
}

impl TarotSuit {
    pub const MAJOR_ARCANA: Pip = Pip {
        pip_type: PipType::Special,
        weight: 4,
        index: 'M',
        symbol: '🔮',
        value: 5,
    };
    pub const WANDS: Pip = Pip {
        pip_type: PipType::Suit,
        weight: 3,
        index: 'W',
        symbol: '🪄',
        value: 4,
    };
    pub const CUPS: Pip = Pip {
        pip_type: PipType::Suit,
        weight: 2,
        index: 'C',
        symbol: '🍷',
        value: 3,
    };
    pub const SWORDS: Pip = Pip {
        pip_type: PipType::Suit,
        weight: 1,
        index: 'S',
        symbol: '',
        value: 2,
    };
    pub const PENTACLES: Pip = Pip {
        pip_type: PipType::Suit,
        weight: 0,
        index: 'P',
        symbol: '',
        value: 1,
    };
}

impl TarotRank {
    // Major Arcana
    pub const FOOL: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 22,
        index: '0',
        symbol: '🤡',
        value: 23,
    };
    pub const MAGICIAN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 21,
        index: '1',
        symbol: '🎩',
        value: 22,
    };
    pub const HIGH_PRIESTESS: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 20,
        index: '2',
        symbol: '😇',
        value: 21,
    };
    pub const EMPRESS: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 19,
        index: '3',
        symbol: '👸',
        value: 20,
    };
    pub const EMPEROR: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 18,
        index: '4',
        symbol: '🤴',
        value: 19,
    };
    pub const HIEROPHANT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 17,
        index: '5',
        symbol: '👑',
        value: 18,
    };
    pub const LOVERS: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 16,
        index: '6',
        symbol: '💑',
        value: 17,
    };
    pub const CHARIOT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 15,
        index: '7',
        symbol: '🏎',
        value: 16,
    };
    pub const STRENGTH: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 14,
        index: '8',
        symbol: '💪',
        value: 15,
    };
    pub const HERMIT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 13,
        index: '9',
        symbol: '🕵',
        value: 14,
    };
    pub const WHEEL_OF_FORTUNE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 12,
        index: 'A',
        symbol: '🎡',
        value: 13,
    };
    pub const JUSTICE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 11,
        index: 'B',
        symbol: '',
        value: 12,
    };
    pub const HANGED_MAN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 10,
        index: 'C',
        symbol: '🙃',
        value: 11,
    };

    pub const DEATH: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 9,
        index: 'D',
        symbol: '💀',
        value: 10,
    };
    pub const TEMPERANCE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 8,
        index: 'E',
        symbol: '🚭',
        value: 9,
    };
    pub const DEVIL: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 7,
        index: 'F',
        symbol: '😈',
        value: 8,
    };
    pub const TOWER: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 6,
        index: 'G',
        symbol: '🗼',
        value: 7,
    };
    pub const STAR: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 5,
        index: 'H',
        symbol: '',
        value: 6,
    };
    pub const MOON: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 4,
        index: 'I',
        symbol: '🌜',
        value: 5,
    };
    pub const SUN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 3,
        index: 'J',
        symbol: '',
        value: 4,
    };
    pub const JUDGEMENT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 2,
        index: 'K',
        symbol: '🔔',
        value: 3,
    };
    pub const WORLD: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 0,
        index: 'L',
        symbol: '🌍',
        value: 1,
    };

    // Minor Arcana
    pub const KING: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 13,
        index: 'K',
        symbol: 'K',
        value: 14,
    };
    pub const QUEEN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 12,
        index: 'Q',
        symbol: 'Q',
        value: 13,
    };
    pub const KNIGHT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 11,
        index: 'N',
        symbol: '🃏',
        value: 12,
    };
    pub const PAGE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 10,
        index: 'P',
        symbol: 'P',
        value: 11,
    };
    pub const TEN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 9,
        index: 'T',
        symbol: 'T',
        value: 10,
    };
    pub const NINE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 8,
        index: '9',
        symbol: '9',
        value: 9,
    };
    pub const EIGHT: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 7,
        index: '8',
        symbol: '8',
        value: 8,
    };
    pub const SEVEN: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 6,
        index: '7',
        symbol: '7',
        value: 7,
    };
    pub const SIX: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 5,
        index: '6',
        symbol: '6',
        value: 6,
    };
    pub const FIVE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 4,
        index: '5',
        symbol: '5',
        value: 5,
    };
    pub const FOUR: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 3,
        index: '4',
        symbol: '4',
        value: 4,
    };
    pub const THREE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 2,
        index: '3',
        symbol: '3',
        value: 3,
    };
    pub const TWO: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 1,
        index: '2',
        symbol: '2',
        value: 2,
    };
    pub const ACE: Pip = Pip {
        pip_type: PipType::Rank,
        weight: 0,
        index: 'A',
        symbol: 'A',
        value: 1,
    };
}