# Piles

Contributed by Fabio Pozzi

The game is played using a standard 52 card deck, by four players in teams of two. Team members are opposite each other. The dealer deals out 10 cards for each player, one by one; the remaining 12 cards are placed face up in the middle of the table, arranged in a 4x3 rectangle called “Castle”.

The player left to the dealer starts play placing one card on the Castle; the others will follow in clockwise order. Cards are to be placed on the Castle, on top of those already on the desk, forming piles. Each pile is controlled by the card on top of it.

The color (red or black) of the first card played by the opener assigns the color of each team for that game: e.g., if the opener chooses to play a 3 of Hearts, he and his partner will be the Reds, and the other team the Blacks. Goal of the Reds is to score points by capturing black cards, and vice versa for the Blacks.

Each card has an intrinsic value that follows the natural order, starting from the Ace (1) up to the King (13). In the Castle, each pile can have from 2 up to 4 neighbors, i.e. piles adjacent either horizontally or vertically. The four corner piles have two neighbors, the other six edge piles have three neighbors and the two interior piles have four neighbors each. The total value of a card on the Castle is equal to its intrinsic value increased by 1 for each neighbor of the same color and decreased by 1 for each of the opposite: e.g. a red 10 on top of a pile which has 3 red and 1 black neighbors, will have a total value of 12, equal to the intrinsic value of a Queen.

### Rules of the game

1. It's always allowed to place a card on top of another card of the same color
2. A card of the opposite color can be placed, changing the control of the pile, if the card to be placed has an intrinsic value higher than the total value of the card on top of that pile
3. A player can pass his turn. In that case, the opponent at his left will pick at random one of his cards. That card is stored by the player who takes it, and will be added to the piles picked up by that player's team at the end of the game, possibly contributing to their score.

### End of the game and scoring

A game is over after everyone has had 10 turns, when the players run out of cards. Each team picks up the piles topped by the cards of their color together with any cards they took when their opponents passed (rule 3 above), and all the cards of the opponents' color within these cards are used for the final score. In the final scoring, an Ace is worth 9 points, a King 4, a Queen 3, a Jack 2 and the remaing cards 1 point each. The Red team will sum up the values of the captured black cards, and the other way around for the Blacks.

### Two player game

The game can also be played by two players, under the same rules. In that case, when the two players run out of the first 10 cards, the dealer will deal out the remaing and the game will go on as usual.