Grouping Points Together in Shapes

Let's learn how to group multiple points to make a shape in Phoenix LiveView.

The Shape module is responsible for modeling pentomino shapes. It will wrap up the attributes that describe a shape and implement some functions that manage the behavior of shapes. In this lesson, we’ll define the Shape module and implement its constructor function. We’ll use the Point.prepare/4 function we just built to prepare a shape for rendering in the correct location, given some input.

Get hands-on with 1200+ tech skills courses.