simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Feb 15 23:17:59 GMT 2023


TL;DR:
  9394e9c Tighten grid-size limit in Mines
  232cbaf Note in the documentation that Pattern clues are in order

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-15 23:17:59

commit 9394e9c74bdb48dc1c74693bcb41fd35f8fc743c
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=9394e9c74bdb48dc1c74693bcb41fd35f8fc743c;hp=7364ce8e266d947be146d635958a7b282752aac6
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Wed Feb 15 14:07:34 2023 +0000

    Tighten grid-size limit in Mines
    
    Mines uses random_upto() to decide where to place mines, and
    random_upto() takes a maximum limit of 2^28-1, so limit the number of
    grid squares to that (or INT_MAX if someone's still trying to build on
    a 16-bit system).
    
    This avoids an assertion failure: "random_upto: Assertion `bits < 32'
    failed." which can be demonstrated by this save file:
    
    SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
    VERSION :1:1
    GAME    :5:Mines
    PARAMS  :5:18090
    CPARAMS :5:18090
    DESC    :11:r9,u,MEdff6
    UI      :2:D0
    TIME    :1:0
    NSTATES :1:2
    STATEPOS:1:2
    MOVE    :4:O2,1

 mines.c | 7 +++++++
 1 file changed, 7 insertions(+)

commit 232cbaf5a8affcb0c61f1355f0569efaae534ad9
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=232cbaf5a8affcb0c61f1355f0569efaae534ad9;hp=9394e9c74bdb48dc1c74693bcb41fd35f8fc743c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Wed Feb 15 23:17:04 2023 +0000

    Note in the documentation that Pattern clues are in order
    
    Requested in Debian bug #642207 and seems perfectly reasonable.

 puzzles.but | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)



More information about the tartarus-commits mailing list