simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Jan 31 23:30:22 GMT 2023
TL;DR:
ccd579e Loopy: Specify can_solve as true, rather than 1
789e11f Remove various unused game functions
e2f4463 Explicitly document that various function pointers can be NULL
aecbbc9 Remove an odd mention of NO_PRINTING from Mosaic
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2023-01-31 23:30:22
commit ccd579e72ee8ea2de46786a6b296f37a0ecf5867
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=ccd579e72ee8ea2de46786a6b296f37a0ecf5867;hp=4359f59dd22770a94e29b2ddd54b533ad1713550
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Tue Jan 31 21:03:36 2023 +0000
Loopy: Specify can_solve as true, rather than 1
loopy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 789e11f8f802889904c7eb137d354877f647c88d
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=789e11f8f802889904c7eb137d354877f647c88d;hp=ccd579e72ee8ea2de46786a6b296f37a0ecf5867
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Tue Jan 31 21:05:47 2023 +0000
Remove various unused game functions
If can_configure is false, then the game's configure() and
custom_params() functions will never be called. If can_solve is false,
solve() will never be called. If can_format_as_text_ever is false,
can_format_as_text_now() and text_format() will never be called. If
can_print is false, print_size() and print() will never be called. If
is_timed is false, timing_state() will never be called.
In each case, almost all puzzles provided a function nonetheless. I
think this is because in Puzzles' early history there was no "game"
structure, so the functions had to be present for linking to work. But
now that everything indirects through the "game" structure, unused
functions can be left unimplemented and the corresponding pointers set
to NULL.
So now where the flags mentioned above are false, the corresponding
functions are omitted and the function pointers in the "game" structures
are NULL.
blackbox.c | 29 +++--------------------------
bridges.c | 7 +------
cube.c | 37 ++++---------------------------------
dominosa.c | 7 +------
fifteen.c | 17 ++---------------
filling.c | 7 +------
flip.c | 17 ++---------------
flood.c | 17 ++---------------
galaxies.c | 7 +------
guess.c | 29 +++--------------------------
inertia.c | 17 ++---------------
keen.c | 21 ++-------------------
lightup.c | 7 +------
loopy.c | 7 +------
magnets.c | 7 +------
map.c | 19 ++-----------------
mines.c | 10 +---------
mosaic.c | 17 ++---------------
net.c | 19 ++-----------------
netslide.c | 29 +++--------------------------
nullgame.c | 49 +++++--------------------------------------------
palisade.c | 8 +-------
pattern.c | 7 +------
pearl.c | 7 +------
pegs.c | 25 +++----------------------
range.c | 8 +-------
rect.c | 7 +------
samegame.c | 25 +++----------------------
signpost.c | 7 +------
singles.c | 7 +------
sixteen.c | 17 ++---------------
slant.c | 7 +------
solo.c | 9 +--------
tents.c | 7 +------
towers.c | 9 +--------
tracks.c | 7 +------
twiddle.c | 17 ++---------------
undead.c | 17 ++---------------
unequal.c | 7 +------
unruly.c | 7 +------
untangle.c | 29 +++--------------------------
41 files changed, 71 insertions(+), 539 deletions(-)
commit e2f4463c3e3c24783bb777e932587e3c266e3297
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=e2f4463c3e3c24783bb777e932587e3c266e3297;hp=789e11f8f802889904c7eb137d354877f647c88d
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Tue Jan 31 22:27:16 2023 +0000
Explicitly document that various function pointers can be NULL
There are various functions pointed to by the game structure that are
only called if certain flags are set. Some of them were documented as
not being called when the flags were clear, but there was no explicit
statement that the pointers could simply be NULL in that case. Now
there is.
devel.but | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
commit aecbbc9220138e6aa41e3990b69840956873cc6a
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=aecbbc9220138e6aa41e3990b69840956873cc6a;hp=e2f4463c3e3c24783bb777e932587e3c266e3297
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Tue Jan 31 23:10:43 2023 +0000
Remove an odd mention of NO_PRINTING from Mosaic
mosaic.c | 2 --
1 file changed, 2 deletions(-)
More information about the tartarus-commits
mailing list