simon-git: puzzles (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Wed Oct 14 22:20:04 BST 2015


TL;DR:
  156b0c3 Stop animations on a new game, no matter how it is started.
  f3f0f00 Don't stop animations when restarting an already restarted game.
  af010d7 Remove a redundant line of code.
  bf81e9c Reset midend animation counters on starting a new game.
  988b16a End victory flash on new game and restart game.
  5ddb011 Invert the Fifteen cursor if FIFTEEN_INVERT_CURSOR ~= ^[yY].*$
  12fabc4 Add hinting feature to Fifteen (press 'h' for a hint).
  cd67072 Add standalone Fifteen solver, based on the hint feature.
  ef5c017 Add hinting feature to Guess.
  d050073 In GTK frontend, bind mouse8/mouse9 to undo/redo.

Repository:     git://git.tartarus.org/simon/puzzles.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=puzzles.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-10-14 22:20:04

commit 156b0c3e23acc3aee3f8a4f7d94132ba227de751
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=156b0c3e23acc3aee3f8a4f7d94132ba227de751;hp=11b14a5f44967a6257ac1beabb6425f95f3b2c69
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 00:17:19 2015 +0200

    Stop animations on a new game, no matter how it is started.
    
    Animations were stopped if a new game was initiated with a keyboard
    shortcut (n, N, Ctrl-N), but not via menu items such as presets or
    custom configurations, nor (perhaps not a problem) on starting the
    program. Fix this, so that animations are stopped on a new game no
    matter how the new game is started.

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

commit f3f0f009fffc078c441e388ccf7d0bd95dffc621
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=f3f0f009fffc078c441e388ccf7d0bd95dffc621;hp=156b0c3e23acc3aee3f8a4f7d94132ba227de751
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 10:43:51 2015 +0200

    Don't stop animations when restarting an already restarted game.
    
    Restarting a game that is already in the restarted state is meant to
    be a no-op.  It stopped animations.  Don't do this.
    
    Also, given that midmidend_restart_game called midend_stop_anim
    twice, the invocation we remove was redundant.

 midend.c |    2 --
 1 file changed, 2 deletions(-)

commit af010d7283c4b9abbd610c93d9bc49d69e1eccfe
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=af010d7283c4b9abbd610c93d9bc49d69e1eccfe;hp=f3f0f009fffc078c441e388ccf7d0bd95dffc621
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 10:47:11 2015 +0200

    Remove a redundant line of code.
    
    Setting me->anim_time = 0.0 right before calling midend_finish_move is
    redundant, since midend_finish_move itself sets me->anim_time = 0.

 midend.c |    1 -
 1 file changed, 1 deletion(-)

commit bf81e9c1fac2dc891d15d107a56db0c9b7482c20
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=bf81e9c1fac2dc891d15d107a56db0c9b7482c20;hp=af010d7283c4b9abbd610c93d9bc49d69e1eccfe
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 10:54:47 2015 +0200

    Reset midend animation counters on starting a new game.
    
    This is already done in midend_restart_game via midend_finish_move.
    If it's good enough for restarting a game, it ought to also be good
    enough for starting new games.

 midend.c |    1 +
 1 file changed, 1 insertion(+)

commit 988b16a3191282a5407f6cee88d62aaae853be3d
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=988b16a3191282a5407f6cee88d62aaae853be3d;hp=bf81e9c1fac2dc891d15d107a56db0c9b7482c20
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 11:00:29 2015 +0200

    End victory flash on new game and restart game.
    
    Net provides the best demonstration of why. Complete a game of net,
    then press N while the victory flash is playing: then the victory
    flash keeps playing on the new game board. (Tip: save a game which
    but for a redo is completed, then you can reproduce this repeatedly
    without having to complete a new game each time.)
    
    The flash timer reset code is placed together with the animation
    timer reset code, because the two are conceptually related. Note
    that midend_restart_game resets animations via midend_finish_move.

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

commit 5ddb011a57be24f4d3474c497e57e7c22f979106
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=5ddb011a57be24f4d3474c497e57e7c22f979106;hp=988b16a3191282a5407f6cee88d62aaae853be3d
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 11:57:54 2015 +0200

    Invert the Fifteen cursor if FIFTEEN_INVERT_CURSOR ~= ^[yY].*$
    
    The introduction of flip_cursor allows us to replace some hairy
    hand-rolled logic with the standardised and tested move_cursor.

 fifteen.c |   61 +++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 37 insertions(+), 24 deletions(-)

commit 12fabc4add608622da87096bb3bed586efee10d9
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=12fabc4add608622da87096bb3bed586efee10d9;hp=5ddb011a57be24f4d3474c497e57e7c22f979106
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 12:20:15 2015 +0200

    Add hinting feature to Fifteen (press 'h' for a hint).
    
    This is really an incremental solver. It alternates between solving
    rows and solving columns. Each row and column is solved one piece at
    a time. Except for some temporary trickery with the last two pieces
    in a row or column, once a piece is solved it is never moved again.
    
    (On non-square grids it first solves some rows or some columns until
    the unsolved part is a square, then starts alternating.)

 fifteen.c   |  214 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 puzzles.but |    4 ++
 2 files changed, 218 insertions(+)

commit cd67072556c6b5934005b1777a465aca1e9df545
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=cd67072556c6b5934005b1777a465aca1e9df545;hp=12fabc4add608622da87096bb3bed586efee10d9
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 8 12:55:52 2015 +0200

    Add standalone Fifteen solver, based on the hint feature.
    
    Recall that the hint feature is really an incremental solver.  Apply
    it repeatedly until the board is solved. Grade puzzles as solvable
    or unsolvable by checking their parity.

 fifteen.R |    3 ++
 fifteen.c |   99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 99 insertions(+), 3 deletions(-)

commit ef5c017a5f6863b5f8f2085b0c26106765d73ffb
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=ef5c017a5f6863b5f8f2085b0c26106765d73ffb;hp=cd67072556c6b5934005b1777a465aca1e9df545
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Thu Oct 1 22:53:53 2015 +0200

    Add hinting feature to Guess.
    
    Pressing H now suggests the lexicographically first row consistent
    with all previous feedback.
    
    The previous function of the H key to toggle a hold marker on the
    current peg is now performed by Space / CURSOR_SELECT2, which is more
    in line with other puzzles anyway.

 guess.c     |  134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 puzzles.but |    6 ++-
 2 files changed, 137 insertions(+), 3 deletions(-)

commit d0500732f7bdab97ecaece2c5c74dd18f8122ea4
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=d0500732f7bdab97ecaece2c5c74dd18f8122ea4;hp=ef5c017a5f6863b5f8f2085b0c26106765d73ffb
Author: Jonas Kölker <jonaskoelker at yahoo.com>
Date:   Fri Oct 2 18:17:15 2015 +0200

    In GTK frontend, bind mouse8/mouse9 to undo/redo.
    
    These button codes are generated by the back/forward button pair on
    the sides of some mice, and web browsers treat these as the back and
    forward actions in the page history.

 gtk.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list