I'm thinking about making some functions for this, because of the bigger interest nowadays, but I will need to make multiple functions, because of performance reasons , and always the correct one should be used. Like 2x2 one if you only need 4 tiles or 3x3 if you need up to 9, and the 4x4 (up to 16 tiles) only if…