UML model

For building this game, we will adopt the following straightforward UML diagram:

So far, we have three main components:

  • Itontine: Interface for Tontine game functions
  • Cplayer: A class for managing players (enrollment, modification, and so on)
  • Ctontine: A contract for implementing Tontine game functions

As you'll notice, the interface name starts with an I prefix, whereas contracts starts with a C prefix.

Now, let's talk code.

Get Blockchain By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.