chiark / gitweb /
atoms
11 years agoatoms.lisp: Style cleanup.
Mark Wooding [Sun, 24 Mar 2013 01:40:35 +0000 (01:40 +0000)]
atoms.lisp: Style cleanup.

11 years agoatoms.lisp: Multiple player types.
Mark Wooding [Sun, 24 Mar 2013 01:40:18 +0000 (01:40 +0000)]
atoms.lisp: Multiple player types.

Keep a list of player type names and classes, and allow the user to
fiddle with player types in the `new game' dialogue.

11 years agoatoms.lisp: Don't start the game automatically.
Mark Wooding [Sun, 24 Mar 2013 01:22:28 +0000 (01:22 +0000)]
atoms.lisp: Don't start the game automatically.

Also, rename the default players.

11 years agoatoms.lisp: Move `export' calls to near the appropriate definition.
Mark Wooding [Sun, 24 Mar 2013 01:21:40 +0000 (01:21 +0000)]
atoms.lisp: Move `export' calls to near the appropriate definition.

11 years agoatoms.lisp: Rewrite `update-undo-redo-sensitivity'.
Mark Wooding [Fri, 22 Mar 2013 22:54:09 +0000 (22:54 +0000)]
atoms.lisp: Rewrite `update-undo-redo-sensitivity'.

Less duplication, and no hideous line-breaks.

11 years agoatoms.lisp: Fix undo/redo action sensitivity.
Mark Wooding [Fri, 22 Mar 2013 22:52:52 +0000 (22:52 +0000)]
atoms.lisp: Fix undo/redo action sensitivity.

Undo should be available after the first turn, but wasn't.  The reason
is twofold:

  * `update-undo-redo-sensitivity' was hooked onto :processing-move
    rather than :start-turn, which was just a mistake, though it seemed
    not to be because the order of the notifications was wrong; and

  * `perform-explosions', which is where :start-turn is issued, was
    being called before the undo record was laid down, whereas it should
    always have been afterwards.

11 years agoatoms.lisp: When restoring an unstable position, continue the animation.
Mark Wooding [Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)]
atoms.lisp: When restoring an unstable position, continue the animation.

Otherwise, the following thing goes wrong.  You make a move which starts
a chain reaction; you undo it before the reaction has resolved and there
are still atoms from other players; and then you redo the move.  At this
point, you have a static board and nobody can play, since both players
are :playing.

11 years agoatoms.lisp: Allow a single player.
Mark Wooding [Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)]
atoms.lisp: Allow a single player.

He can't win, but that's OK.  It still allows some experimentation with
the rules.

11 years agoatoms.lisp: Reorder the notifications in `play-cell'.
Mark Wooding [Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)]
atoms.lisp: Reorder the notifications in `play-cell'.

Really :processing-move should always come before :start-turn.

11 years agoatoms.lisp: Cancel the explosion animation when we restore a snapshot.
Mark Wooding [Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)]
atoms.lisp: Cancel the explosion animation when we restore a snapshot.

Otherwise we get terribly confused about who's supposed to be playing.

11 years agoatoms.lisp: A player about to make a move is active.
Mark Wooding [Fri, 22 Mar 2013 22:34:41 +0000 (22:34 +0000)]
atoms.lisp: A player about to make a move is active.

Fixes a bug in `game-update-scores' which you should never actually see,
since a player shouldn't become ready if the game's already been won.
But this was exposed by another bug, so I might as well fix it.

11 years agoInitial commit.
Mark Wooding [Fri, 22 Mar 2013 02:24:14 +0000 (02:24 +0000)]
Initial commit.