]> git.cworth.org Git - empires-server/commit
Add a new "broadcast_event_object" method to accept an obejct not a string
authorCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:57:22 +0000 (06:57 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:57:22 +0000 (06:57 -0700)
commitea4d0802292a43555d5710041a050f6df71c38e0
tree9915f4a8d1b869875347cbef1a132fc2657c44f6
parent1b8674fabbdfab627f12727cdc3616a233cd767a
Add a new "broadcast_event_object" method to accept an obejct not a string

I probably want this to be the default, (replacing broadcast_event
entirely, or perhaps renaming it to broadcast_event_string if there
are any users that do need to stick around).

With cases like this, I do wish I was using a type safe language to
avoid the confusion that comes with "Does this function want an object
or a string representation of that object?".
game.js