]> git.cworth.org Git - empires-server/commit
Fix game-state object to include players judging and answering
authorCarl Worth <cworth@cworth.org>
Sun, 14 Jun 2020 21:55:12 +0000 (14:55 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 25 Jun 2020 16:16:04 +0000 (09:16 -0700)
commitc748592a7db27adebd48b45970b5f0ffbedb3300
tree3dd3a03eadc6cdb3cfdb2b0cc7d386940b251731
parent9008208ecebde544671e9c42f1d15fc9fc834f91
Fix game-state object to include players judging and answering

Previously, these were always appearing as empty objects in the JSON
results that we streamed from the server in the game-state object
because JSON.stringify doesn't natively know how to serialize a Set
object.

Here, we provide a replacer function that serializes a Set object as
an array.
game.js