]> git.cworth.org Git - empires-server/commit
Switch team property from being a string to being an object
authorCarl Worth <cworth@cworth.org>
Fri, 5 Jun 2020 23:55:55 +0000 (16:55 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 00:07:03 +0000 (17:07 -0700)
commitc381788fa303d9ca392fc4b7b25c4d55344717da
tree4d5723caf71ad2c1a54417912fd6da71a4bd30ae
parent038e9507a47ff66398f01931f271159d4a0b2aa5
Switch team property from being a string to being an object

This should be cleaner as it avoids a bunch of bare string literals
all around the place that happen to match. Now, the player's team
property is a pointer into the game's array of teams. And for the case
when a player is not on a team, the game file maintains a "no_game"
sentinel object (with an empty-string name).
game.js
tictactoe.js