Dobble

January 15, 2016

Dobble is a French card game that uses 55 cards, each with 8 symbols; any pair of cards have exactly one symbol in common. The game is played by dealing one card to each player and placing the remaining cards face-up in the center of the table; the first player to spot the symbol that matches the top card on his pile to the top card on the central pile calls out the name of the symbol, then moves the top card from the central pile to the top of his own pile, and the game continues until all cards in the central pile have been claimed, with the winner being the player with the most cards.

Your task is to write a program that creates a suitable deck of cards, so that every pair of cards has exactly one symbol in common. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

Advertisement

Pages: 1 2

One Response to “Dobble”

  1. matthew said

    Nice problem (and solution) but don’t we need some extra constraints, for example, that every symbol appears on exactly 8 cards? Otherwise there are significantly smaller suitable decks, eg. this one (which I think is the smallest possible) with only 9 cards and 36 symbols:

     1  2  3  4  5  6  7  8
     1  9 10 11 12 13 14 15
     2  9 16 17 18 19 20 21
     3 10 16 22 23 24 25 26
     4 11 17 22 27 28 29 30
     5 12 18 23 27 31 32 33
     6 13 19 24 28 31 34 35
     7 14 20 25 29 32 34 36
     8 15 21 26 30 33 35 36
    

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: