Loopy / grid.c: support the new Spectre monotiling.

This uses a tile shape very similar to the hat, but the tiling
_structure_ is totally changed so that there aren't any reflected
copies of the tile.

I'm not sure how much difference this makes to gameplay: the two
tilings are very similar for Loopy purposes. But the code was fun to
write, and I think the Spectre shape is noticeably prettier, so I'm
adding this to the collection anyway.

The test programs also generate a pile of SVG images used in the
companion article on my website.
This commit is contained in:
Simon Tatham
2023-06-16 18:30:53 +01:00
parent c82537b457
commit a33d9fad02
15 changed files with 4691 additions and 1 deletions

View File

@ -285,6 +285,7 @@ static void check_caches(const solver_state* sstate);
A("Kagome",KAGOME,3,3) \
A("Compass-Dodecagonal",COMPASSDODECAGONAL,2,2) \
A("Hats",HATS,6,6) \
A("Spectres",SPECTRES,6,6) \
/* end of list */
#define GRID_NAME(title,type,amin,omin) title,
@ -557,6 +558,8 @@ static const game_params loopy_presets_more[] = {
{ 3, 3, DIFF_HARD, LOOPY_GRID_GREATDODECAGONAL },
{ 3, 2, DIFF_HARD, LOOPY_GRID_GREATGREATDODECAGONAL },
{ 3, 3, DIFF_HARD, LOOPY_GRID_COMPASSDODECAGONAL },
{ 6, 6, DIFF_HARD, LOOPY_GRID_HATS },
{ 6, 6, DIFF_HARD, LOOPY_GRID_SPECTRES },
#else
{ 10, 10, DIFF_HARD, LOOPY_GRID_HONEYCOMB },
{ 5, 4, DIFF_HARD, LOOPY_GRID_GREATHEXAGONAL },
@ -568,6 +571,7 @@ static const game_params loopy_presets_more[] = {
{ 5, 3, DIFF_HARD, LOOPY_GRID_GREATGREATDODECAGONAL },
{ 5, 4, DIFF_HARD, LOOPY_GRID_COMPASSDODECAGONAL },
{ 10, 10, DIFF_HARD, LOOPY_GRID_HATS },
{ 10, 10, DIFF_HARD, LOOPY_GRID_SPECTRES },
#endif
};