Starting point for the Celtic-Egyptian-Ratscrew card game, as a code kata.

Overview

The object of the game is to accrue all the cards from the deck into your hand. Play proceeds clockwise around the circle of players, with each player laying a card onto the centre stack and calling out a sequence number: the first card is 1 (or “ace”), the second card is 2, up until the 11th card which can be called 11 or “jack”. The counting is reset to 1/”ace” on the 14th card. Any player may call snap on any player’s turn to win the stack, like in classic Snap, although the snap rule is more complex and explained later. A player incorrectly snapping the stack incurs a penalty, preventing that player from calling snap again until another player has won the stack.

Rules

Preparation

  • An entire deck of cards is dealt out to the players as fairly as possible (some people may have one more card than others).
  • Players keep their cards in a pile, face-down in front them.

Order of play

  • The player that was dealt the first card starts the game, and play continues in a clockwise direction.
  • On each turn, the player takes the top card from their pile and lays it on the stack, while at the same time calling out the card they are currently on. Calling out is explained later.
  • A player who plays out of turn incurs a penalty (see below).
  • At any point during the game any player may snap the stack.

Winning conditions

To win, a player must have all the cards in their pile.

Snaps

If you perform a valid snap, you pick up the the cards the stack and add them, face-down, to the bottom of your pile. It then becomes your turn. If you perform an invalid snap, you incur a penalty (see below).

Types of valid snaps

  • Calling out: The rank of the card that was last laid matches the one that was called out by the player who laid that card
  • Standard: There are two cards of the same rank (e.g. 2 tens, 2 Jacks) next to each other anywhere in the stack
  • Sandwich: There is a sandwich somewhere in the stack. A sandwich is where there are two cards of the same rank with exactly one other card of any rank between them, e.g. [1, 2, 1], [2, 1, 2], [1, 3, 1].
  • Dark queen: The top card is the queen of spades.
  • Counting out: It is also valid to snap if the counting out rules below have been satisfied, i.e. we've counted down from the counting out value of the picture card to 0.

Calling out

Each time any player lays a card, they must also call out, as follows:

  • For first card laid in the game, they call "1" or "ace"
  • For the second card, the player calls "2"
  • ...
  • And so on until the 11th card in the game, when the player calls "11" or "jack"
  • On the 12th card, the player calls "12" or "queen"
  • On the 13th card, the player calls "13" or "king"
  • On the 14th card, they start again, calling "1" or "ace"
  • etc

Counting out

Counting out is another way of winning the stack. Counting out happens whenever someone lays a picture card (a Jack, Queen, King or Ace), like this:

  • When a picture card is laid, the counting out value is started at the value shown below.
  • Each time someone correctly lays a card, the counting out value is reduced by 1.
  • If the counting out value is 0 and there are no other valid snaps available, then the person who played the original picture card wins the stack as if they snapped it. If there are valid snaps, then the first player to snap wins the stack.
  • If the counting out rule is active and a new picture card is laid, then a new counting out phase starts, displacing the old one.
Card Value
Ace 4
King 3
Queen 2
Jack 1

Penalty

A player with a penalty is not allowed to attempt a snap on the current stack. The penalty remains in place until another player has won the stack.