chiark / gitweb /
Elide some fields from save game state where we can
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Apr 2022 11:02:11 +0000 (12:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Apr 2022 12:30:43 +0000 (13:30 +0100)
commitd4b419ecf193cb667f7f5f35dee8a51064aa699d
tree2e531be0ffb11592c1a660f5c9378b4b84caf831
parentffe43d13e455abcefc290f0e25dd995ede7d98c2
Elide some fields from save game state where we can

This saves writing out the field names as well as just the vslues.

We would like to do this for the updates sent to the client, but that
would really depend on the JS nullable coalesce operator "??" which is
not available the version of typescript I'm using, nor our ES
compatibility target.  Newer typescript would do a polyfill but that
maybe wouldn't be super-fast?  So postpone that.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs
src/spec.rs