]> git.cworth.org Git - empires-server/commitdiff
game: Add support for a static "meta" field to hold game metadata
authorCarl Worth <cworth@cworth.org>
Sun, 31 May 2020 23:34:44 +0000 (16:34 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 1 Jun 2020 00:09:57 +0000 (17:09 -0700)
We use a static getter/setter function for this since JavaScript
doesn't yet have wide support for static fields.

Also, we duplicate the data on both a field within the class itself
(Game._meta) as well as in the prototype (Game.prototype). The purpose
of this is so that we can access this meta-data as either a class
static (Game.meta) or via an instance (some_game.meta).


No differences found