simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Apr 1 20:45:33 BST 2023


TL;DR:
  0bd1a80 Magnets: add a check that magnets don't wrap between lines

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-04-01 20:45:33

commit 0bd1a8057841386754f9f4a8a268616c7ce80e80
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=0bd1a8057841386754f9f4a8a268616c7ce80e80;hp=91735e5019be84d2fa693c5d40746c818ace28f8
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Apr 1 18:54:29 2023 +0100

    Magnets: add a check that magnets don't wrap between lines
    
    There was nothing in Magnet's description validation to prevent there
    being the left end of a magnet at the right end of a row and the right
    end of a magnet at the left end of the row below.  Indeed as far as I
    can such a game (e.g. 3x3:..2,2..,...,1.1,TLRB*LRLR) plays entirely
    correctly except that one magnet is discontinuous.
    
    While this worked, it was entirely an artefact of the particular memory
    layout that Magnets uses and shouldn't have been allowed, so I've added
    an additional validation rule to stop it.

 magnets.c | 2 ++
 1 file changed, 2 insertions(+)



More information about the tartarus-commits mailing list