The initial Object-Oriented (OO) approach, is to create independent classes for all variations of the plates and colored bricks. Each class made this way would extend either SquarePlate or HexagonPlate and specify their brick’s color. At first sight, this solves the objective, but this approach also causes some problems.
Firstly, it is not possible to change the color of the brick after the code compiles. This is not an attractive behavior since we may want to add a color swapping feature in the future. Having the flexibility of changing the object’s strategy at runtime, is therefore valuable for us.
Secondly, it creates an exponentially growing number of classes. Currently, the amount of classes are contained to a low number. However, more plates and colored bricks might be added in the future. If this happens, it will quickly become a problem and developers will likely loose the overview.