diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-03-28 20:27:27 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-03-28 20:51:02 +0100 |
| commit | 6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b (patch) | |
| tree | 2593b368da3c58b87a9e75d248ad35bf17cd9ace /hat-tables.h | |
| parent | 2b1167d82ad7d7f6617c812f61c6b62dd8553e7e (diff) | |
| download | puzzles-6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b.zip puzzles-6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b.tar.gz puzzles-6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b.tar.bz2 puzzles-6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b.tar.xz | |
Hats tiling: more uniform parent selection.
This tweak improves the uniformity of the generated patches of hat
tiling, by selecting from (the closest 32-bit approximation I can get
to) the limiting probability distribution of finite patches in the
whole plane.
This shouldn't invalidate any grid description that contains enough
coordinates to uniquely specify a piece of tiling - in particular, any
generated by the game itself. But if anyone's been brave enough to
hand-type a grid description in the last two days and left off some of
the coordinates, then those might be invalidated.
Diffstat (limited to 'hat-tables.h')
| -rw-r--r-- | hat-tables.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/hat-tables.h b/hat-tables.h index cdf6236..b55fbb4 100644 --- a/hat-tables.h +++ b/hat-tables.h @@ -31,69 +31,6 @@ static const size_t nchildren[] = { 11, }; -static const MetatilePossibleParent permitted_parents_H[] = { - { TT_H, 0 }, - { TT_H, 1 }, - { TT_H, 2 }, - { TT_T, 0 }, - { TT_P, 0 }, - { TT_P, 1 }, - { TT_F, 0 }, - { TT_F, 1 }, -}; -static const MetatilePossibleParent permitted_parents_T[] = { - { TT_H, 3 }, -}; -static const MetatilePossibleParent permitted_parents_P[] = { - { TT_H, 4 }, - { TT_H, 5 }, - { TT_H, 6 }, - { TT_T, 1 }, - { TT_T, 2 }, - { TT_T, 3 }, - { TT_P, 2 }, - { TT_P, 3 }, - { TT_P, 4 }, - { TT_F, 2 }, - { TT_F, 3 }, -}; -static const MetatilePossibleParent permitted_parents_F[] = { - { TT_H, 7 }, - { TT_H, 8 }, - { TT_H, 9 }, - { TT_H, 10 }, - { TT_H, 11 }, - { TT_H, 12 }, - { TT_T, 4 }, - { TT_T, 5 }, - { TT_T, 6 }, - { TT_P, 5 }, - { TT_P, 6 }, - { TT_P, 7 }, - { TT_P, 8 }, - { TT_P, 9 }, - { TT_P, 10 }, - { TT_F, 4 }, - { TT_F, 5 }, - { TT_F, 6 }, - { TT_F, 7 }, - { TT_F, 8 }, - { TT_F, 9 }, - { TT_F, 10 }, -}; -static const MetatilePossibleParent *const permitted_parents[] = { - permitted_parents_H, - permitted_parents_T, - permitted_parents_P, - permitted_parents_F, -}; -static const size_t n_permitted_parents[] = { - 8, - 1, - 11, - 22, -}; - static const KitemapEntry kitemap_H[] = { /* hat #0 in metatile #0 (type H) */ {1,0,0}, {7,3,0}, {3,0,4}, {4,0,4}, |