The Dobble Algorithm

Micky Dore
7 min readFeb 15, 2021
A deck of Dobble cards.
A deck of Dobble cards.

Welcome to the second part of this series where we will learn to create our own online, multiplayer Dobble game. Before we move onto actually creating our game, there’s one more crucial piece of the puzzle that we need to solve. In the previous chapter we took a look at the mathematical principles behind the game’s foundations and were able to draw similarities between the game of Dobble and projective planes. Then we were able to represent these planes as incidence matrices visualising all of the lines and all their points. This is all fine and dandy however we need a more efficient way to create these incidence matrices as the order of the plane increases.

One algorithm to rule them all

For this chapter, we will be focusing on creating an algorithm that will do two things.

  • Take in an order (size) of a projective plane.
  • Return an incidence matrix for a projective plane of the given order.

Thankfully for my mathematically impaired brain, there’s tons of invaluable advice and research out there by people who love the game just as much as me but are, quite frankly, far superior mathematicians. This thread on Stack Overflow includes great discussion on possible algorithms for creating incidence matrices like we’ve seen previously. After trawling through a great deal of discussion i’ve…

--

--

Micky Dore
Micky Dore

Written by Micky Dore

A curious software developer interested in this 'n' that

No responses yet