chiark / gitweb /
otter.git
4 years agoclock: Swap x and y
Ian Jackson [Sun, 21 Mar 2021 12:32:35 +0000 (12:32 +0000)]
clock: Swap x and y

It just makes more sense for White to be X.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Show x and y when unclaimed
Ian Jackson [Sun, 21 Mar 2021 12:30:07 +0000 (12:30 +0000)]
clock: Show x and y when unclaimed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Better handling when one player has flag up
Ian Jackson [Sun, 21 Mar 2021 12:25:21 +0000 (12:25 +0000)]
clock: Better handling when one player has flag up

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoUpdate to modern wasm-bindgen
Ian Jackson [Sun, 21 Mar 2021 12:04:42 +0000 (12:04 +0000)]
Update to modern wasm-bindgen

This involves
 * Cargo.toml update to unpin the version
 * Cargo.lock update, consequential
 * Get rid of our ad-hoc kludge to get the wasm object into script.ts

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo: Fix syntax for wasm-bindgen dependency
Ian Jackson [Sun, 21 Mar 2021 11:41:30 +0000 (11:41 +0000)]
cargo: Fix syntax for wasm-bindgen dependency

This meant what I meant, but it's strange.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoREADME.md: Update dependency count
Ian Jackson [Sun, 21 Mar 2021 11:40:07 +0000 (11:40 +0000)]
README.md: Update dependency count

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoUse stamp file for wasm-bindgen-cli
Ian Jackson [Sun, 21 Mar 2021 11:37:20 +0000 (11:37 +0000)]
Use stamp file for wasm-bindgen-cli

cargo doesn't always touch the file, so we end up with useless
rebuilds etherwise.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo: Rename lockfile to Cargo.lock
Ian Jackson [Sun, 21 Mar 2021 11:20:00 +0000 (11:20 +0000)]
cargo: Rename lockfile to Cargo.lock

This is apparently recommended for a thing which is a program.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefile: Delete some obsolete commented-out stuff
Ian Jackson [Sun, 21 Mar 2021 11:19:05 +0000 (11:19 +0000)]
Makefile: Delete some obsolete commented-out stuff

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoREADME.md: Mention bubblewrap dependency
Ian Jackson [Sun, 21 Mar 2021 11:18:25 +0000 (11:18 +0000)]
README.md: Mention bubblewrap dependency

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoREADME.md: Remove references to wasm-pack
Ian Jackson [Sun, 21 Mar 2021 11:17:19 +0000 (11:17 +0000)]
README.md: Remove references to wasm-pack

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefile: Drop use of wasm-pack
Ian Jackson [Sun, 21 Mar 2021 10:47:34 +0000 (10:47 +0000)]
Makefile: Drop use of wasm-pack

I'm told on Discord that this is obsolete.  (The docs all still
mention it, though.)

Anyway, the only thing it was actually doing for us was obtaining and
running wasm-bindgen.  We can do that ourselves.

At one time we were using it to get and run wasm-opt, saving 5k out of
50k in the wasm file, but that was broken so we disabled it a while
ago.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo: Add our dependency on wasm-bindgen-cli
Ian Jackson [Sun, 21 Mar 2021 10:21:38 +0000 (10:21 +0000)]
cargo: Add our dependency on wasm-bindgen-cli

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefile: introduce MAKEFILE_FIND_X
Ian Jackson [Sun, 21 Mar 2021 11:10:14 +0000 (11:10 +0000)]
Makefile: introduce MAKEFILE_FIND_X

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefile: Introduce MAKEFILE_DEP
Ian Jackson [Sun, 21 Mar 2021 11:01:09 +0000 (11:01 +0000)]
Makefile: Introduce MAKEFILE_DEP

This lets us say MAKEFILE_DEP='' to avoid unwanted rebuilding, while
we are editing the Makefile itself.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo update
Ian Jackson [Sun, 21 Mar 2021 10:25:51 +0000 (10:25 +0000)]
cargo update

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo: Add two more missing newlines at end of files
Ian Jackson [Sun, 21 Mar 2021 01:50:53 +0000 (01:50 +0000)]
cargo: Add two more missing newlines at end of files

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocargo: toplevel: Add missing newline at end of file
Ian Jackson [Sun, 21 Mar 2021 01:50:05 +0000 (01:50 +0000)]
cargo: toplevel: Add missing newline at end of file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoRemove spurious "g" which ended up in the template somehow
Ian Jackson [Sun, 21 Mar 2021 02:01:49 +0000 (02:01 +0000)]
Remove spurious "g" which ended up in the template somehow

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Avoid distracting text selection when clicking
Ian Jackson [Sun, 21 Mar 2021 00:49:57 +0000 (00:49 +0000)]
clock: Avoid distracting text selection when clicking

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Do not allow a player to access entirely-invisible pieces
Ian Jackson [Sun, 21 Mar 2021 00:32:04 +0000 (00:32 +0000)]
hidden: Do not allow a player to access entirely-invisible pieces

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoupdates: Remove an obsolete todo
Ian Jackson [Sun, 21 Mar 2021 00:20:14 +0000 (00:20 +0000)]
updates: Remove an obsolete todo

We don't need a function for mapping pos.  This is done via
PieceRenderInstructions etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Update max_z for max occulted displaced Z
Ian Jackson [Sun, 21 Mar 2021 00:16:01 +0000 (00:16 +0000)]
hidden: Update max_z for max occulted displaced Z

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Tidy up a dbg!
Ian Jackson [Sat, 20 Mar 2021 23:54:40 +0000 (23:54 +0000)]
hidden: Tidy up a dbg!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoDo occultation removal before actually removing the piece
Ian Jackson [Sat, 20 Mar 2021 23:52:42 +0000 (23:52 +0000)]
Do occultation removal before actually removing the piece

Otherwise the code in hidden gets *quite* unhappy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Handle removal of occulted pieces (more)
Ian Jackson [Sat, 20 Mar 2021 23:42:39 +0000 (23:42 +0000)]
hidden: Handle removal of occulted pieces (more)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Handle removal of occulted pieces
Ian Jackson [Sat, 20 Mar 2021 23:37:35 +0000 (23:37 +0000)]
hidden: Handle removal of occulted pieces

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Remove a done comment
Ian Jackson [Sat, 20 Mar 2021 23:31:04 +0000 (23:31 +0000)]
hidden: Remove a done comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Fix a comment to refer to the right thing
Ian Jackson [Sat, 20 Mar 2021 23:30:02 +0000 (23:30 +0000)]
hidden: Fix a comment to refer to the right thing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Prevent occultation scrambling of grasped things
Ian Jackson [Sat, 20 Mar 2021 23:26:55 +0000 (23:26 +0000)]
hidden: Prevent occultation scrambling of grasped things

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoscript: Remove a done todo
Ian Jackson [Sat, 20 Mar 2021 23:20:26 +0000 (23:20 +0000)]
script: Remove a done todo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Tiny style change
Ian Jackson [Sat, 20 Mar 2021 23:19:48 +0000 (23:19 +0000)]
clock: Tiny style change

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Make it Moveable IfWresting if claimed
Ian Jackson [Sat, 20 Mar 2021 23:18:03 +0000 (23:18 +0000)]
clock: Make it Moveable IfWresting if claimed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceMoveable: Honour in JS
Ian Jackson [Sat, 20 Mar 2021 23:11:03 +0000 (23:11 +0000)]
PieceMoveable: Honour in JS

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceMoveable: Provide in session data
Ian Jackson [Sat, 20 Mar 2021 23:10:51 +0000 (23:10 +0000)]
PieceMoveable: Provide in session data

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceMoveable: Enforce in /m api call
Ian Jackson [Sat, 20 Mar 2021 22:58:41 +0000 (22:58 +0000)]
PieceMoveable: Enforce in /m api call

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceMoveable: Move calculation into a method on GPiece
Ian Jackson [Sat, 20 Mar 2021 22:58:21 +0000 (22:58 +0000)]
PieceMoveable: Move calculation into a method on GPiece

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceMoveable: Put in updates
Ian Jackson [Sat, 20 Mar 2021 22:52:11 +0000 (22:52 +0000)]
PieceMoveable: Put in updates

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohand: Remove a wrong todo comment
Ian Jackson [Sat, 20 Mar 2021 22:31:31 +0000 (22:31 +0000)]
hand: Remove a wrong todo comment

We don't need PUU::RecalculateOccultations.  This is done by create_
and remove_occultation.  This is just as well as a PUO would be
horrible.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohand: Remove a wrong todo comment
Ian Jackson [Sat, 20 Mar 2021 22:29:55 +0000 (22:29 +0000)]
hand: Remove a wrong todo comment

We don't need to do anything special.  cmdlistener will take care of
removing any occultation.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Serialise the `current`
Ian Jackson [Sat, 20 Mar 2021 22:28:04 +0000 (22:28 +0000)]
clock: Serialise the `current`

Not sure why this wasn't done before.  Probably some remnant of early
design things.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Provide a loaded_hook, to restart after load
Ian Jackson [Sat, 20 Mar 2021 22:27:51 +0000 (22:27 +0000)]
clock: Provide a loaded_hook, to restart after load

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceTrait, global: Provide loaded_hook() with &InstanceRef
Ian Jackson [Sat, 20 Mar 2021 22:21:35 +0000 (22:21 +0000)]
PieceTrait, global: Provide loaded_hook() with &InstanceRef

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPieceTrait, global: Provide loaded_hook()
Ian Jackson [Sat, 20 Mar 2021 22:15:44 +0000 (22:15 +0000)]
PieceTrait, global: Provide loaded_hook()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoReplace OE::PieceGone with POE::PieceGone
Ian Jackson [Sat, 20 Mar 2021 22:06:57 +0000 (22:06 +0000)]
Replace OE::PieceGone with POE::PieceGone

The client might experience PieceGone due to occultation, so that's
not an error.  The Delete update in the updates stream will generally
tell them what's going on.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Delete some now-obsolete todos
Ian Jackson [Sat, 20 Mar 2021 21:58:37 +0000 (21:58 +0000)]
clock: Delete some now-obsolete todos

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agootterlib: Turn an must fix into a todo
Ian Jackson [Sat, 20 Mar 2021 21:58:09 +0000 (21:58 +0000)]
otterlib: Turn an must fix into a todo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Delete mockup files
Ian Jackson [Sat, 20 Mar 2021 21:57:35 +0000 (21:57 +0000)]
clock: Delete mockup files

We don't need these now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Fix reset view again
Ian Jackson [Sat, 20 Mar 2021 21:38:47 +0000 (21:38 +0000)]
clock: Fix reset view again

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Tidying, refactor, introduce initial()
Ian Jackson [Sat, 20 Mar 2021 21:37:45 +0000 (21:37 +0000)]
clock: Tidying, refactor, introduce initial()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Tidying, rename Spec
Ian Jackson [Sat, 20 Mar 2021 21:34:18 +0000 (21:34 +0000)]
clock: Tidying, rename Spec

This was very confusing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Tidying, introduce ChessClock::per_move()
Ian Jackson [Sat, 20 Mar 2021 21:32:54 +0000 (21:32 +0000)]
clock: Tidying, introduce ChessClock::per_move()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Tidying, code motion
Ian Jackson [Sat, 20 Mar 2021 21:31:30 +0000 (21:31 +0000)]
clock: Tidying, code motion

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Give Y an extra per_move
Ian Jackson [Sat, 20 Mar 2021 21:28:43 +0000 (21:28 +0000)]
clock: Give Y an extra per_move

This breaks detection of whether we're reset.  We'll fix that in a
moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Actually get per_move basically working
Ian Jackson [Sat, 20 Mar 2021 21:23:24 +0000 (21:23 +0000)]
clock: Actually get per_move basically working

There are still some wrinkles.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Fix per_move implementation (try to)
Ian Jackson [Sat, 20 Mar 2021 21:22:20 +0000 (21:22 +0000)]
clock: Fix per_move implementation (try to)

This still doesn't work when it needs to because typically the clock
is paused in both cases and this function then exits early.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Plumb was_current through to do_start_or_stop
Ian Jackson [Sat, 20 Mar 2021 21:19:37 +0000 (21:19 +0000)]
clock: Plumb was_current through to do_start_or_stop

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopenultima: clock: Add a per_move time to the spec
Ian Jackson [Sat, 20 Mar 2021 21:16:17 +0000 (21:16 +0000)]
penultima: clock: Add a per_move time to the spec

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Implement per_move, but brokenly
Ian Jackson [Sat, 20 Mar 2021 20:16:55 +0000 (20:16 +0000)]
clock: Implement per_move, but brokenly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: auto-swap active player
Ian Jackson [Sat, 20 Mar 2021 19:25:35 +0000 (19:25 +0000)]
clock: auto-swap active player

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Fix spinning
Ian Jackson [Sat, 20 Mar 2021 19:20:50 +0000 (19:20 +0000)]
clock: Fix spinning

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Add a missing Debug derive
Ian Jackson [Sat, 20 Mar 2021 19:20:13 +0000 (19:20 +0000)]
clock: Add a missing Debug derive

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Some todos
Ian Jackson [Sat, 20 Mar 2021 19:00:45 +0000 (19:00 +0000)]
clock: Some todos

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Implement held_change_hook, at least in part
Ian Jackson [Sat, 20 Mar 2021 18:47:04 +0000 (18:47 +0000)]
clock: Implement held_change_hook, at least in part

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Break out unprepared_update()
Ian Jackson [Sat, 20 Mar 2021 18:52:40 +0000 (18:52 +0000)]
clock: Break out unprepared_update()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Implement the thread which actually counts
Ian Jackson [Sat, 20 Mar 2021 18:10:41 +0000 (18:10 +0000)]
clock: Implement the thread which actually counts

This is still not entirely right...

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopass PieceId to held_change_hook
Ian Jackson [Sat, 20 Mar 2021 18:47:41 +0000 (18:47 +0000)]
pass PieceId to held_change_hook

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopass &InstanceRef to held_change_hook
Ian Jackson [Sat, 20 Mar 2021 18:45:18 +0000 (18:45 +0000)]
pass &InstanceRef to held_change_hook

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoprelude: Provide CLOCK_MONOTONIC too
Ian Jackson [Sat, 20 Mar 2021 21:47:41 +0000 (21:47 +0000)]
prelude: Provide CLOCK_MONOTONIC too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Provide InstanceWeakRef
Ian Jackson [Sat, 20 Mar 2021 17:29:02 +0000 (17:29 +0000)]
global: Provide InstanceWeakRef

The chess clock is going to need this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Reset it on loading
Ian Jackson [Sat, 20 Mar 2021 16:56:36 +0000 (16:56 +0000)]
clock: Reset it on loading

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Break out State::reset (nfc)
Ian Jackson [Sat, 20 Mar 2021 16:53:25 +0000 (16:53 +0000)]
clock: Break out State::reset (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: svg: Position secs explicitly
Ian Jackson [Sat, 20 Mar 2021 16:50:17 +0000 (16:50 +0000)]
clock: svg: Position secs explicitly

The sigil might kern oddly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: svg: Break out "font", nfc
Ian Jackson [Sat, 20 Mar 2021 16:48:07 +0000 (16:48 +0000)]
clock: svg: Break out "font", nfc

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock svg: wip, playing about
Ian Jackson [Sat, 20 Mar 2021 16:47:59 +0000 (16:47 +0000)]
clock svg: wip, playing about

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Actually send out the PieceImage updates
Ian Jackson [Sat, 20 Mar 2021 16:42:55 +0000 (16:42 +0000)]
clock: Actually send out the PieceImage updates

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Sort out updates to actually work
Ian Jackson [Sat, 20 Mar 2021 21:41:22 +0000 (21:41 +0000)]
clock: Sort out updates to actually work

We use the new Image facility, and use Unpredictable as approriate.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: impl Display for User and fix Debug to be debuggy
Ian Jackson [Sat, 20 Mar 2021 21:40:46 +0000 (21:40 +0000)]
clock: impl Display for User and fix Debug to be debuggy

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Try making these all WRC::Unpredictable
Ian Jackson [Sat, 20 Mar 2021 12:40:54 +0000 (12:40 +0000)]
clock: Try making these all WRC::Unpredictable

This was flailing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: User swap to other position
Ian Jackson [Fri, 19 Mar 2021 19:47:25 +0000 (19:47 +0000)]
clock: User swap to other position

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Some todos
Ian Jackson [Fri, 19 Mar 2021 01:27:25 +0000 (01:27 +0000)]
clock: Some todos

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Improve layout slightly
Ian Jackson [Fri, 19 Mar 2021 01:23:36 +0000 (01:23 +0000)]
clock: Improve layout slightly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Fix a typo in svg
Ian Jackson [Fri, 19 Mar 2021 01:19:40 +0000 (01:19 +0000)]
clock: Fix a typo in svg

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Prevent both users being the same
Ian Jackson [Fri, 19 Mar 2021 01:18:29 +0000 (01:18 +0000)]
clock: Prevent both users being the same

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Use BadPieceStateForOperation
Ian Jackson [Fri, 19 Mar 2021 01:13:50 +0000 (01:13 +0000)]
clock: Use BadPieceStateForOperation

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: implement ui_operation
Ian Jackson [Fri, 19 Mar 2021 00:20:13 +0000 (00:20 +0000)]
clock: implement ui_operation

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Rename fn initial_time
Ian Jackson [Fri, 19 Mar 2021 00:44:23 +0000 (00:44 +0000)]
clock: Rename fn initial_time

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPlumb &InstanceRef through to load()
Ian Jackson [Sat, 20 Mar 2021 01:09:05 +0000 (01:09 +0000)]
Plumb &InstanceRef through to load()

clock will want this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoupdates: log_did_to_piece*: take immutable GPlayer
Ian Jackson [Fri, 19 Mar 2021 01:05:46 +0000 (01:05 +0000)]
updates: log_did_to_piece*: take immutable GPlayer

Not sure why this took a mutable one ever...

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoprelude: Add POE
Ian Jackson [Sat, 20 Mar 2021 00:33:05 +0000 (00:33 +0000)]
prelude: Add POE

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Implement add_ui_operations
Ian Jackson [Thu, 18 Mar 2021 23:48:28 +0000 (23:48 +0000)]
clock: Implement add_ui_operations

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoxdata: Some reformatting
Ian Jackson [Fri, 19 Mar 2021 00:40:34 +0000 (00:40 +0000)]
xdata: Some reformatting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoxdata: Provide get_mut_exp
Ian Jackson [Fri, 19 Mar 2021 00:38:24 +0000 (00:38 +0000)]
xdata: Provide get_mut_exp

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoxdata: Break out xdata_missing
Ian Jackson [Fri, 19 Mar 2021 00:36:22 +0000 (00:36 +0000)]
xdata: Break out xdata_missing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoxdata: Split out xdata_get_mut_inner
Ian Jackson [Fri, 19 Mar 2021 00:34:38 +0000 (00:34 +0000)]
xdata: Split out xdata_get_mut_inner

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: impl TryFrom<char> for User
Ian Jackson [Fri, 19 Mar 2021 00:22:47 +0000 (00:22 +0000)]
clock: impl TryFrom<char> for User

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoRename BadClockUserError so we can reuse it
Ian Jackson [Fri, 19 Mar 2021 00:20:41 +0000 (00:20 +0000)]
Rename BadClockUserError so we can reuse it

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoplumb GameState into add_ui_operations
Ian Jackson [Fri, 19 Mar 2021 00:05:40 +0000 (00:05 +0000)]
plumb GameState into add_ui_operations

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: Rename Current from Running
Ian Jackson [Thu, 18 Mar 2021 23:48:07 +0000 (23:48 +0000)]
clock: Rename Current from Running

This is the user whose turn it is but we might be paused, not running.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoclock: finish display (more or less)
Ian Jackson [Thu, 18 Mar 2021 23:34:56 +0000 (23:34 +0000)]
clock: finish display (more or less)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>