simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Mar 28 20:55:02 BST 2023
TL;DR:
6f75879 Hats tiling: more uniform parent selection.
22417ef Hats tiling: make hat-test draw each hat in one go.
828c7da hat-test: allow specifying tiling size on the command line.
827051d hat-test: alternative data output mode to write Python.
4720eeb Loopy: widen clip rectangle for redrawing clues.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2023-03-28 20:55:02
commit 6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b;hp=2b1167d82ad7d7f6617c812f61c6b62dd8553e7e
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 28 20:27:27 2023 +0100
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.
auxiliary/hatgen.c | 26 --------
hat-tables.h | 63 ------------------
hat.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 176 insertions(+), 96 deletions(-)
commit 22417efad6173417e414bee532a6dcd20324e87d
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=22417efad6173417e414bee532a6dcd20324e87d;hp=6f75879e9fe7cb5dc72c9229d1772e31e4f5c77b
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 28 20:29:45 2023 +0100
Hats tiling: make hat-test draw each hat in one go.
By introducing a second callback between the client of hat.c and the
maybe_report_hat function, I enable the test main() to provide a
different version of that callback, so that instead of enumerating
each kite, it can directly generate a Postscript path per actual hat.
This should make it more useful to people wanting to generate hat
patterns for any other purpose.
The internal callback gets more details than the external one; in
particular, it receives a HatCoords, so that it can colour hats based
on their position in the hierarchical structure.
hat.c | 150 ++++++++++++++++++++++++++----------------------------------------
1 file changed, 59 insertions(+), 91 deletions(-)
commit 828c7da78561768a52a2c38d7c8c9bc1d14c3120
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=828c7da78561768a52a2c38d7c8c9bc1d14c3120;hp=22417efad6173417e414bee532a6dcd20324e87d
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 28 20:31:21 2023 +0100
hat-test: allow specifying tiling size on the command line.
I'm tired of recompiling every time I want a different size of test
patch.
hat.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
commit 827051dafea79f112e929c9cc7732183696fad72
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=827051dafea79f112e929c9cc7732183696fad72;hp=828c7da78561768a52a2c38d7c8c9bc1d14c3120
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 28 20:35:03 2023 +0100
hat-test: alternative data output mode to write Python.
This mode emits a sequence of calls to an imaginary Python function.
Should be useful to anyone wanting to post-process the tiling in any
way.
hat.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 111 insertions(+), 47 deletions(-)
commit 4720eeb1aaf2591613a17345d4e4326287c0e8bc
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=4720eeb1aaf2591613a17345d4e4326287c0e8bc;hp=827051dafea79f112e929c9cc7732183696fad72
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 28 20:48:28 2023 +0100
Loopy: widen clip rectangle for redrawing clues.
The new Hats tiling generates a lot of clues that are 2-digit numbers.
At large puzzle sizes, the previous clip rectangle didn't quite
include the ends of such a number, meaning that if the number had to
be redrawn in red to highlight an error, the leftmost and rightmost
parts of the text would remain black.
loopy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the tartarus-commits
mailing list