> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/duck-down/rules.md).

# Rules

The cards, a turn, the special cards, calling Duck Down and how a round is counted.

Everyone has four cards face down and knows only two of them. Card by card they swap the bad ones away, until someone calls "Duck Down". Whoever has the fewest points at the end of the game wins.

## The cards

The deck has 66 cards by default (`Config.Deck`).

| Card   | How many     | Points                     |
| ------ | ------------ | -------------------------- |
| 0 to 8 | four of each | its number                 |
| 9      | nine         | 9                          |
| Swap   | nine         | none, it is a special card |
| Peek   | seven        | none, it is a special card |
| Double | five         | none, it is a special card |

## A round

A round begins with four cards face down in front of every player and one card face up beside the deck, which is the pile.

Everyone looks at their two outer cards once (`Config.PeekTime`). After that a card is only seen again by playing for it.

The first round is begun by a player chosen by chance, each following round by the next player round the table.

## A turn

Draw the top card of the deck, or take the top card of the pile if it is a number.

* **A number card** is swapped for one of your four cards, which goes face up on the pile without your having looked at it first.
* A card from the deck may be thrown away instead. A card from the pile has to be swapped in.
* **A special card** does something when it is drawn from the deck, or is thrown away unused.

## Special cards

| Card   | What it does                                                                        |
| ------ | ----------------------------------------------------------------------------------- |
| Peek   | Look at one of your own cards                                                       |
| Swap   | Exchange one of your cards with a card of another player. Neither card is looked at |
| Double | Draw a card. If you throw it away, you draw one more. A card you use ends the turn  |

A special card on the pile cannot be taken. A special card that lies in a row, dealt there or swapped there, does nothing.

## Duck Down

A player who thinks they have the fewest points calls "Duck Down" during their turn. The turn runs to its end. Then every other player gets exactly one more turn, and the round is over.

## The end of a round

All cards are turned over. Special cards in a row are set aside and replaced by cards from the deck, the caller's first, until a number lies there. Then every row is added up.

With `Config.CallPenalty`, a caller gets that many points on top if someone else has fewer points. A tie is good enough for the caller. The default is 0, which is no penalty.

## The end of the game

A game has as many rounds as there are players, or as many as the first player chose in the lobby (`Config.Rounds`, `Config.RoundChoices`). The points of all rounds are added up, and whoever has the fewest wins. In a tie, all tied players win and share the pot.

## When the deck runs out

The pile under its top card is shuffled into a new deck. Should there be no card left to draw at all, the round ends as it stands.

## Running out of time

If a step runs out of time (`Config.TurnTime`), a card is drawn for the player and thrown away again. A card taken from the pile goes back there.

## How much memory the game asks for

`Config.KeepKnown` decides it.

| Value             | Effect                                                                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `false` (default) | As at a real table. A card you have seen is turned over again and you have to remember it                                                                     |
| `true`            | The cards you know stay face up for you, marked with an eye, wherever they are moved: your own, and a card of someone else's that you saw before it got there |
