There is a class Rules, which has in itself some set of rules. Several cards, a pair of primitives, etc.
There is an interface / abstract class CellMatrix .
There are several implementations of it, which in the constructor accept the Rules class for initialization:
class CellMatrixArray implements CellMatrix{ CellMatrixArray(Rules r){} } class MapMatrixArray implements CellMatrix{ MapMatrixArray(Rules r){} } There is a main class that contains this CellMatrix . Implementation, of course, is unknown.
class PlayerField{ PlayerField(Rules r){} private CellMatrix matrix; //назначается сеттером или конструктором. } But, apparently, this class also accepts Rules for initialization. I really do not like it, that I have to poke this initializer several times into different classes, especially classes connected by aggregation. I got such a stupid initialization scheme:

I cannot create CellMatrix objects inside PlayerField - I need to provide for the possibility of inheritance / implementation change. I'm thinking, maybe an abstract factory to create something like this:
interface CellMatrixFactory{ void setRules(Rules r); CellMatrix createMatrix(); } And send this factory to PlayerField. Those. I’ll get rid of sending Rules to several places, sending it to PlayerField once, calling factory setRules and creating CellMatrix.