simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Feb 16 16:11:47 GMT 2023


TL;DR:
  3cd51d0 Solo: cope with pencil marks when tilesize == 1

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-16 16:11:47

commit 3cd51d001769c657ebb4184bd05343af4d7e12b1
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=3cd51d001769c657ebb4184bd05343af4d7e12b1;hp=232cbaf5a8affcb0c61f1355f0569efaae534ad9
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Thu Feb 16 15:54:17 2023 +0000

    Solo: cope with pencil marks when tilesize == 1
    
    Solo's layout calculations for pencil marks could fail with a tilesize
    of 1, generating an assertion failure: "draw_number: Assertion `pbest
    > 0' failed."  This was reported as Debian bug #905852.
    
    My solution is slightly silly, namely to change a ">" in the test for
    whether a new layout is the best so far to ">=".  This allows for
    finding a (terrible) layout even for tilesize == 1, and also has the
    side-effect of slightly preserring wide layouts over tall ones.
    Personally, I think that's an improvement.

 solo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the tartarus-commits mailing list