Tracking a Game in a Board

Let's Learn how to move shapes on a board with specific behaviors.

The Board module will be responsible for tracking a game. It will produce structs that describe the attributes of a board and implement a constructor function for creating new boards when a user starts a game of Pentominoes. Later, it will implement reducers to manage the behavior of a board, including commands to select a pento to move, rotate, or reflect a pento, drop a piece into place, and more.

Representing board attributes

A board struct will have the following attributes:

  • points: The points that make up the shape of the empty board that the user will fill up with pentominoes. All of our shapes will be rectangles of different sizes.
  • completed_pentos: The list of pentominoes that the user has placed on the board.
  • palette: The provided pentominoes that the user has available to solve the puzzle.
  • active_pento: The currently selected pentomino that the user is moving around the board.
...