Thirteen, best known as Clock Patience, is a simple game of solitaire. Thirteen face-down stacks of four cards are dealt with 12 arranged in a circle like the numbers on a clock. In this simulation the stacks are arranged in a grid with the 13th pile off to the left of 4 spaces reserved for kings. To begin play, the top card of the 13th stack is turned up and placed on top of the stack in the position of its number on a clock face. The Ace is 1, Jack is 11, Queen is 12.
When a card is placed on a stack, the bottom card on that stack is taken out and moved to its correct place, and so on.
If a king is turned up, it is placed below the stacks and the next card is drawn from the top of stack 13.
Player wins if all stacks are turned up before all 4 kings are placed. There is a 1 in 13 chance of winning. No skill is involved; the outcome is determined by the deal.
To begin play, get a new deck, shuffle, and deal. The deal is displayed so one can follow the play.