simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Feb 10 18:32:57 GMT 2023


TL;DR:
  bf9abb2 Forbid impossible moves in Bridges
  ad2fb76 Forbid game descriptions with joined islands in Bridges

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-10 18:32:57

commit bf9abb2a127a4a81babe50ecb419527f8aeffe28
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=bf9abb2a127a4a81babe50ecb419527f8aeffe28;hp=bd5c0a37a019c540eda05f8291cad90ffd598134
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Fri Feb 10 17:09:18 2023 +0000

    Forbid impossible moves in Bridges
    
    Specifically, a bridge or a non-bridge must connect two islands that
    differ in precisely one co-ordinate.  Without this, a save file that
    tries to connect or disconnect two non-orthogonal islands will cause
    "island_join: Assertion `!"island_join: islands not orthogonal."'
    failed."
    
    Here's a save file demonstrating the problem:
    
    SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
    VERSION :1:1
    GAME    :7:Bridges
    PARAMS  :13:3x3i30e10m2d0
    CPARAMS :13:3x3i30e10m2d0
    DESC    :6:b1c1a2
    NSTATES :1:2
    STATEPOS:1:2
    MOVE    :10:L0,2,2,0,1

 bridges.c | 3 +++
 1 file changed, 3 insertions(+)

commit ad2fb760fc881d1ceb1ac1151bf60b85deb16c71
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=ad2fb760fc881d1ceb1ac1151bf60b85deb16c71;hp=bf9abb2a127a4a81babe50ecb419527f8aeffe28
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Fri Feb 10 18:28:36 2023 +0000

    Forbid game descriptions with joined islands in Bridges
    
    A game description with islands in adjacent grid squares, like
    "3x3:11g", shouldn't be allowed.  If it is, then bridges between the
    islands are invisible and clicking one of them causes an assertion
    failure: "Assertion `is_loop->adj.points[j].off > 1' failed."
    
    The code to check this is really rather complex, but I think the
    complexity is mostly necessary.

 bridges.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)



More information about the tartarus-commits mailing list