Carl Worth [Sun, 3 May 2020 22:03:56 +0000 (15:03 -0700)]
Add some linting fixes
Specifically some missing semicolons and a missing const.
It's funny that I didn't realize that emacs was doing live linting of
JavaScript all along here, (and highlighting all problems with various
colors and underlining).
Carl Worth [Sun, 3 May 2020 02:24:34 +0000 (19:24 -0700)]
Add simple testing for the entire API
This is more "exercising" than testing, (it doesn't currently verify
the results), but I've verified the server isn't hitting any syntax
errors (with fairly decent code coverage I think) and I've manually
inspected the results to ensure they look correct.
Carl Worth [Sat, 2 May 2020 23:53:13 +0000 (16:53 -0700)]
Add an ID value to each player
This is a first baby step toward implementing the more complete API
for the game which we defined today, and which can be found here:
https://git.cworth.org/git/empires-api
In this commit we also introduce a 'Game' class to encapsulate all
data necessary for the game, (so the 'players' array we had before,
but also the 'next_player_id' which we need now).