Search⌘ K

The Plan

Explore how to create the core components of the Pentominoes game in Phoenix LiveView. Learn to model the game board, define pentomino shapes and points, and manage their placement through rotation and reflection. This lesson lays the foundation for building an interactive, real-time puzzle game by implementing essential data structures and functions step by step.

In this last part of the course, we’ll be building the game of Pentominoes—the favorite game of legendary CBS News anchor Walter Cronkite. Pentominoes is something like a cross between Tetris and a puzzle. The player is presented with a set of shapes called “pentominoes” and a game board of a certain size. The player must figure out how to place all of the pentominoes on the board so that they fit together to evenly cover all of the available space, like a puzzle.

Each pentomino is a shape composed of five even squares joined together. There are 12 basic shapes.

Assuming we’re playing a round of Pentominoes with a large rectangular board and all of the available pentomino shapes, we might end up with a finished puzzle that looks like this:

Now, let’s say we’re playing a round of Pentominoes with a small rectangular board and just three shapes—a :c, a :v, and a :p. We might end up with a finished puzzle that looks like this:

Now that we have a basic idea of how ...