Menu

1 / 5

How a Tombala Card Is Generated: Six Cards, Ninety Numbers

DEV Community: android·Nesim Razon·about 21 hours ago
#FxI4JYQk
#devtoandroid#devto#dev#numbers#column
Reading 0:00
15s threshold

A Tombala card looks simple, but a fair set of cards has strict rules. While building Tombalings I wrote a generator that makes six cards using every number from 1 to 90 exactly once. Here is how it works, and how the rival players are timed so a round feels alive.

The rules a card must follow

A Tombala card has 3 rows and 9 columns with 15 numbers. Each row holds exactly 5 numbers. Each column holds only numbers from its own range: 1 to 9 in the first column, 10 to 19 in the second, and so on, with 80 to 90 in the last. And every column holds between one and three numbers.

Those rules alone are easy. The hard part is a set of six cards: together they must contain every number from 1 to 90 once, no repeats and no gaps.

Why the numbers add up

Look at the columns. The first column has 9 possible numbers, the middle columns have 10 each and the last has 11. Across six cards, every column must be used by every card at least once, so each card starts with one number per column.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.