simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Feb 11 22:56:08 GMT 2023


TL;DR:
  97b03cc Don't allow moves that change the constraints in Unequal

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-02-11 22:56:08

commit 97b03cc67a31c1d0869a21c50b9ca31f78775ff9
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=97b03cc67a31c1d0869a21c50b9ca31f78775ff9;hp=896a73bd7ff8cbde44e97d89cef57346478f0072
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Feb 11 22:49:36 2023 +0000

    Don't allow moves that change the constraints in Unequal
    
    Unequal has a flags word per cell.  Some of those flags are fixed,
    like the locations of the ">" signs, but others indicate errors and
    are used to allow the player to mark clues as "spent".  Move strings
    beginning with "F" allow the user to change the "spent" flags, but
    they shouldn't allow the user to change any other flags, especially
    those marking the constraints.
    
    Without this fix, the following save file gives a "solver_nminmax:
    Assertion `x >= 0 && y >= 0 && x < o && y < o' failed" after it adds a
    clue that points off the board:
    
    SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
    GAME    :7:Unequal
    PARAMS  :3:3e0
    CPARAMS :3:3e0
    DESC    :17:0,0,0,0,0,0,0,0,0
    NSTATES :2:3
    STATEPOS:1:3
    MOVE    :6:F2,0,4
    MOVE    :1:H

 unequal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list