Skip to main content
Formal Specification

It's Raining (Czech Shedding Card Game) — Formal Specification

Czechia · card · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Prší — AI-optimized specification ## General idea A discrete shedding card game where agents discard cards matching the active suit or rank to empty their hand. Action cards introduce cumulative draw penalties (Seven), turn skips (Ace), and wild suit selection (Over-Knave / Svršek), creating tactical counter-chaining opportunities. ## Formal model - **Abstraction taken:** Direct representation. The traditional 32-card deck and turn-based shedding mechanics are completely discrete and require no physical approximation. - **Player/agent count:** N agents (2≤N≤6, standard N=4). - **Turn model:** Strictly sequential clockwise turns, with skip skips applied by Ace cards. ## Formal rules R1. Setup: 32 cards (4 suits × 8 ranks {7,8,9,Under,Over,King,10,Ace}). 4 cards dealt to each agent. Top card of draw pile flipped to initiate `discard_pile`. If initial card is 7, Ace, or Over, it is treated as a neutral rank/suit without triggering its penalty on turn 1. R2. Active state: `current_suit`, `current_rank`, `pending_draw_count = 0`, `pending_skip_count = 0`. R3. Legal action resolution: - Case A: `pending_draw_count > 0` (due to active Seven penalty): - Agent may play a Seven (adding 2 to `pending_draw_count`, passing to next agent). - Otherwise, agent MUST execute `draw_cards(pending_draw_count)`, resetting `pending_draw_count = 0` and ending turn without playing a card. - Case B: `pending_skip_count > 0` (due to active Ace): - Agent may play an Ace (passing skip penalty to next agent). - Otherwise, agent MUST execute `pass_turn()`, decrementing `pending_skip_count = 0`. - Case C: Normal turn (no active penalties): - Agent may play any card c where c.suit==current_suit OR c.rank==current_rank. - Agent may play any Over-Knave (c.rank==Over), declaring a new target_suit∈{Acorns, Leaves, Hearts, Bells}. - If no legal card is held (or agent chooses not to play), agent executes `draw_card()`. [gap-fill] If the drawn card is legal, the agent may optionally play it immediately. R4. Deck reshuffle: If `draw_pile` is empty when an agent must draw, all cards in `discard_pile` except the topmost card are shuffled to form a new `draw_pile`. R5. Action card effects: - Playing a Seven sets `pending_draw_count += 2`. - Playing an Ace sets `pending_skip_count = 1`. - Playing an Over-Knave sets `current_suit = target_suit`. R6. Win condition: The moment an agent's hand size reaches 0, that agent immediately wins and the game concludes. R7. [gap-fill] Turn cap / Anti-stalemate: If 200 turns elapse without a winner, the agent holding the fewest total cards in hand is declared the winner (broken by lowest point sum: Ace=11, 10=10, 7=7, etc.). ## Edge cases - Tie at the end condition: Single winner on empty hand; turn cap tiebreaker uniquely resolved by R7. - A player with no legal move: Addressed by compulsory `draw_card()` action. - Repetition / cycles: Bounded by finite deck permutations and guaranteed termination via R7 move cap. - Simultaneous claims on the same resource: Sequential turn order; only one agent acts per step. - Player elimination mid-round: When an agent wins, the game ends immediately. In multi-place rankings, remaining agents continue clockwise without the eliminated agent. - Resource exhaustion: Handled by R4 discard-pile recycling. - Termination guarantee: Guaranteed by monotonic hand depletion tendencies and bounded strictly by R7 200-turn cap. ## State representation - Persistent state: `hands: list[list[Card]]`, `draw_pile: list[Card]`, `discard_pile: list[Card]`, `current_player: int`, `current_suit: Suit`, `pending_draw: int`, `pending_skip: int`, `turn_counter: int`. - Ephemeral state: Target suit declaration accompanying an Over-Knave play. - Observable information: - Private: Agent's own hand. - Public: Discard pile top card, count of cards in all players' hands, draw pile size, active declared suit, pending penalty counts. ## Action space - `play_card(card: Card, declared_suit: Optional[Suit])` - `draw_cards()` - `pass_turn()` ## Playability notes - Single-player-vs-AI: Highly natural; 1 human vs. 1–3 AI bots. - Group games (n>4): Supports up to 6 players directly. - Physical-skill games: Direct discrete rules; no physical skill abstraction required. - What is lost: Physical table speed and vocal shouts ("Prší!"). ## Implementation hints Low complexity. The central state machine must carefully sequence penalty accumulation (Sevens and Aces) and Over-Knave suit overwriting. Implement as a standard finite state machine with unit tests for chained Sevens across multiple agents.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

It's Raining (Czech Shedding Card Game) (Czechia). (n.d.). Games of Countries. https://gamesofcountries.com/games/cz-czechia/prsi

@misc{gamesofcountries-cz-czechia-prsi,
  title = {It's Raining (Czech Shedding Card Game) (Czechia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/cz-czechia/prsi}
}