simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Jan 19 20:32:21 GMT 2023


TL;DR:
  27c97c0 Allow repeated "solve" operations in Guess

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-19 20:32:21

commit 27c97c0ffdda0b91fecf155f3bc29b32ed806bb2
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=27c97c0ffdda0b91fecf155f3bc29b32ed806bb2;hp=b4aaa11943fb72b09fe173bc97bd9313ff94738c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Thu Jan 19 20:26:23 2023 +0000

    Allow repeated "solve" operations in Guess
    
    Since using the "solve" option doesn't consume a guess, it's safe to
    allow it to occur multiple times.  Without this, selecting "solve" a
    second time causes an assertion failure because solve() returns a move
    string that's rejected by execute_move().
    
    Possible solve() could instead refuse to solve an already-solved
    puzzle, but that seems needlessly pedantic.
    
    [fixes c84af670b52f09e9e47587584c0559c508d4a37d]

 guess.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list