name stringlengths 9 33 | description stringlengths 20 156 | code stringlengths 21 329 | seeds int64 8 8 |
|---|---|---|---|
even_ranks_only | Only cards with an even rank (2,4,6,8,10,12). | return card.rank % 2 == 0 | 8 |
face_cards_only | Only face cards (11,12,13). | return card.rank in {11, 12, 13} | 8 |
ranks_one_to_seven | Only cards between 1 and 7 inclusive. | return 1 <= card.rank <= 7 | 8 |
ranks_five_to_nine | Only cards between 5 and 9 inclusive. | return 5 <= card.rank <= 9 | 8 |
prime_ranks_only | Only ranks that are prime numbers (2,3,5,7,11,13). | primes = {2, 3, 5, 7, 11, 13}
return card.rank in primes | 8 |
only_aces | Only Aces (rank 1) . | return card.rank == 1 | 8 |
spades_only | Only cards of the suit spades. | return card.suit.suit_name == "spades" | 8 |
only_red_cards | Only red cards (hearts or diamonds). | return card.color == "red" | 8 |
spades_and_diamonds_only | Only spades and diamonds. | return card.suit.suit_name in ("spades", "diamonds") | 8 |
no_spades | Only hearts, clubs, and diamonds allowed. Spades are forbidden. | return card.suit.suit_name != "spades" | 8 |
black_face_cards | Only black face cards. | if not mainline:
return card.color == "black" and card.rank >= 11
return card.color == "black" and card.rank >= 11 | 8 |
red_rank_up_to_seven | Only red cards whose rank is <=7. | return card.color == "red" and card.rank <= 7 | 8 |
face_cards_red_number_cards_black | Face cards (11-13) must be red; number cards (1-10) must be black. | if card.rank >= 11:
return card.color == "red"
else:
return card.color == "black" | 8 |
alternating_face_number | Alternate face and number cards. Any card may start the line. | if not mainline:
return True
prev_is_face = mainline[-1].rank >= 11
if prev_is_face:
return card.rank <= 10
else:
return card.rank >= 11 | 8 |
opposite_parity | Card rank must have opposite odd/even parity to the previous card's rank. Any card may start the line. | if not mainline:
return True
return (card.rank % 2) != (mainline[-1].rank % 2) | 8 |
rank_non_decreasing_start_ace | Each card must have a rank greater or equal to the previous card. Only Ace can start the line. | if not mainline:
return card.rank == 1
return card.rank >= mainline[-1].rank | 8 |
alternating_colors | Cards must alternate between red and black colors. Any card may start the line. | if not mainline:
return True
return card.color != mainline[-1].color | 8 |
different_suit | The card must be of a different suit than the card just before it. Any card may start the line. | if not mainline:
return True
return card.suit.suit_name != mainline[-1].suit.suit_name | 8 |
different_suit_same_color | The card must be of a different suit than but same color as the card just before it. Any card may start the line. | if not mainline:
return True
prev = mainline[-1]
return card.suit.suit_name != prev.suit.suit_name and card.color == prev.color | 8 |
cyclic_suit_order | Suits must repeat in the cyclic order hearts → spades → clubs → diamonds → hearts... Any card may start the line. | if not mainline:
return True
order = ["hearts", "spades", "clubs", "diamonds"]
prev_suit = mainline[-1].suit.suit_name
prev_idx = order.index(prev_suit)
expected = order[(prev_idx + 1) % 4]
return card.suit.suit_name == expected | 8 |
alternating_groups | Hearts and spades form Group A; clubs and diamonds form Group B. Alternate between groups. Any card may start the line. | if not mainline:
return True
prev = mainline[-1].suit.suit_name
curr = card.suit.suit_name
group_a = {"hearts", "spades"}
# Determine groups: True for group A, False for group B
prev_group = prev in group_a
curr_group = curr in group_a
return curr_group != prev_group | 8 |
share_color_or_parity | Each card must share at least one property with the previous card: same color, or same parity. Any card may start the line. | if not mainline:
return True
prev = mainline[-1]
same_color = card.color == prev.color
same_parity = (card.rank % 2) == (prev.rank % 2)
return same_color or same_parity | 8 |
red_up_black_down | If the previous card was red, rank must increase or be equal; if black, rank must decrease or be equal. Starting card must be between 5 and 9 inclusive. | if not mainline:
return 5 <= card.rank <= 9
prev = mainline[-1]
if prev.color == "red":
return card.rank >= prev.rank
else: # black
return card.rank <= prev.rank | 8 |
face_card_imposes_suit | Face cards imposes the suit: if a face card is played, the next card must match its suit. Otherwise, the next card must be a different suit than it. | if not mainline:
return True
prev = mainline[-1]
if prev.rank in (11, 12, 13):
return card.suit.suit_name == prev.suit.suit_name
else:
return card.suit.suit_name != prev.suit.suit_name | 8 |
paired_suits_alternating | Suits must appear in pairs: card 1 and 2 same suit, cards 3 and 4 same suit (different from 1 and 2), cards 5 and 6 same suit (different from 3 and 4), etc. | if not mainline:
return True
pos = len(mainline) % 2
if pos == 0:
# first card of a new pair must differ from previous pair's suit
return card.suit.suit_name != mainline[-1].suit.suit_name
else:
# second card of a pair must match the first card's suit
return card.suit.suit_name == mainline[-1].suit.... | 8 |
paired_ranks_distinct | Rank repeats in pairs: ranks must come in doubles: (x, x), then (y, y) with y different from x, then (z, z) with z different from y, etc. | if not mainline:
return True
i = len(mainline)
if i % 2 == 0:
# start of a new pair: rank must differ from previous pair's rank
return card.rank != mainline[-1].rank
else:
# second card of the current pair: rank must match the first card of this pair
return card.rank == mainline[-1].rank | 8 |
README.md exists but content is empty.
- Downloads last month
- 22