Thread:Catinthedark/@comment-3225604-20170722082846/@comment-26388711-20170731221135

Since I do not like disorganized code, there is an alternative technique when creating the automatic hexagon level.

Instead of generating an N, H, or S, generate source code snippets, each of them representing a formatted table cell. Please note that a N means no code snippet, whereas H and S generate snippets.

The process which generate these snippets will be a template which invokes the Hexagon module to extract whether it is a hexagon, and then use that to generate the corresponding code snippet. Let's call this template HexagonEntry.

Another thing is to find a method to determine the level type. To do that, HexagonEntry will need to have another parameter specifying the type.

Then, the structure of HexagonEntry will be.

To further compress the module, the new Hexagon module should pass through just one parameter, representing the episode. The episode parameter generates the corresponding HexagonEntry cells, and will generate the needed cell source code if it is a hexagon.

I already created and optimized the Difficulty/Reality tables by using the table snippet technique. Here, each row representing an episode is generated by DifficultyMatrixEpisode, and DifficultyMatrixEpisode generates the source code snippet needed for that row.