simon-git: puzzles (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Jun 16 19:20:47 BST 2023


TL;DR:
  43f4fde hat-test: support SVG output.
  de13ca2 Add a 'core' library alongside 'common'.
  c82537b Fix some unused-variable warnings.
  a33d9fa Loopy / grid.c: support the new Spectre monotiling.

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-06-16 19:20:47

commit 43f4fde2f2ef694f355edc2777525cf611dc0182
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=43f4fde2f2ef694f355edc2777525cf611dc0182;hp=2be0e4a242421840b2a36d18f6a4193e4fc67432
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jun 15 18:37:39 2023 +0100

    hat-test: support SVG output.
    
    I want to generate an SVG diagram for an upcoming article.

 auxiliary/hat-test.c | 139 +++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 108 insertions(+), 31 deletions(-)

commit de13ca2874e673b426efcf04f734ae6625635396
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=de13ca2874e673b426efcf04f734ae6625635396;hp=43f4fde2f2ef694f355edc2777525cf611dc0182
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Jun 15 07:40:14 2023 +0100

    Add a 'core' library alongside 'common'.
    
    The 'core' library contains almost all the same objects as 'common',
    but leaves out hat.c. And the auxiliary program 'hatgen' now links
    against that slightly reduced core library instead of 'common'.
    
    This avoids a dependency loop: one of hatgen's jobs is to generate
    hat-tables.h, but hat-tables.h is a dependency of it.
    
    Of course, the generated hat-tables.h is already committed, so this
    doesn't present a bootstrapping problem in a normal build. But if
    someone modifies hatgen.c in order to regenerate hat-tables.h, and
    does so in a way that makes it uncompilable, they can't rebuild hatgen
    and try again! Of course you can always revert changes with git, but
    it's annoying to have to. Better to keep the dependencies non-cyclic
    in the first place.

 CMakeLists.txt           |  9 +++++----
 auxiliary/CMakeLists.txt |  2 +-
 cmake/setup.cmake        | 10 ++++++++--
 3 files changed, 14 insertions(+), 7 deletions(-)

commit c82537b4574d45aa16e50b7f8dc1f075cfdb69f9
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=c82537b4574d45aa16e50b7f8dc1f075cfdb69f9;hp=de13ca2874e673b426efcf04f734ae6625635396
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jun 16 19:03:56 2023 +0100

    Fix some unused-variable warnings.
    
    A test-build with a modern clang points out a number of 'set but not
    used' variables, which clang seems to have got better at recently.
    
    In cases where there's conditioned-out or commented-out code using the
    variable, I've left it in and added a warning-suppressing cast to
    void. Otherwise I've just deleted the variables.

 magnets.c  | 1 +
 mosaic.c   | 6 ++----
 palisade.c | 3 ---
 pattern.c  | 6 +-----
 samegame.c | 2 ++
 undead.c   | 6 +++---
 unruly.c   | 2 ++
 7 files changed, 11 insertions(+), 15 deletions(-)

commit a33d9fad02d6319cb9061119a6165ed5493a3ba5
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=a33d9fad02d6319cb9061119a6165ed5493a3ba5;hp=c82537b4574d45aa16e50b7f8dc1f075cfdb69f9
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Jun 16 18:30:53 2023 +0100

    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.

 CMakeLists.txt                   |    2 +-
 auxiliary/CMakeLists.txt         |    2 +
 auxiliary/spectre-gen.c          |  709 ++++++++++++++++++++++
 auxiliary/spectre-help.c         |  417 +++++++++++++
 auxiliary/spectre-help.h         |   51 ++
 auxiliary/spectre-tables-extra.h |  334 +++++++++++
 auxiliary/spectre-test.c         |  534 +++++++++++++++++
 grid.c                           |  315 ++++++++++
 grid.h                           |    1 +
 loopy.c                          |    4 +
 spectre-internal.h               |  277 +++++++++
 spectre-tables-auto.h            | 1220 ++++++++++++++++++++++++++++++++++++++
 spectre-tables-manual.h          |  160 +++++
 spectre.c                        |  594 +++++++++++++++++++
 spectre.h                        |   72 +++
 15 files changed, 4691 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list