]> git.cworth.org Git - empires-server/commit
Empathy: Add routes to receive prompts and votes on prompts
authorCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:59:43 +0000 (06:59 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:59:43 +0000 (06:59 -0700)
commit7671bd12ebaa902c287b0730eeda39dae9f418c8
tree3a05eba848e709b9439eff2633e4049da7e85c0b
parentea4d0802292a43555d5710041a050f6df71c38e0
Empathy: Add routes to receive prompts and votes on prompts

The received votes are added to the prompt objects themselves, so we
don't need to send anything beyond the prompts, and the votes will
just ride along "for free". Also, because prompts are a part of the
Empathy game's "state" property, they will always be sent as part of
the "game-state" event sent when a new client joins, so we don't need
any explicit code in the Empathy class to take care of that either.
empathy.js