I am developing a game and I found a problem that I have to solve in order to handle component layout that reminds me of a packaging problem.
To summarize what I need to do, suppose I have a space similar to the following:
+------------+---------+------------+
| 0 | 1 | 2 |
| | | |
| | | |
| | | |
+------------+---------+------------+
| 3 | 4 | 5 |
| | | |
| | | |
+------------+---------+------------+
| 6 | 7 | 8 |
| | | |
| | | |
| | | |
+------------+---------+------------+
in which each corner cell is 4x4, and the central one is 3x3 (so the rest are 3x4 and 4x3). Then I have a set of elements to place inside these blocks, which can vary from 1x1 to 3x3 (I don't think any 4x4 is needed, but it should not change anything). Of course, these elements cannot cross the lines and must lie completely within the same block.
? , , , (, , , ). , , ..
: 9 (, 3-4), ? ( , , ).
, , :)