]> git.cworth.org Git - empires-server/commit
Add first use of Game.meta to both the Empires and TicTacToe classes
authorCarl Worth <cworth@cworth.org>
Sun, 31 May 2020 23:40:22 +0000 (16:40 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 1 Jun 2020 00:09:57 +0000 (17:09 -0700)
commit49d955e6e751bbed7b4239805f046c16cb5f52d4
tree79a656070ff7a474b7c62090f788dbe27764df5f
parent17ceff9f690f9689f38fe3d0d448fccba72bf044
Add first use of Game.meta to both the Empires and TicTacToe classes

So far, we just set a name field, then we access this name field from
a game instance in each of the implementations of the route handler
for the root path. In each case this is to provide the name of the
game as context for the rendering of the choose-nickname template.

The reason for all of this is to enable convergence of the code
handling that route, (since as soon as the code is precisely common
between both games the code can move up into the base class).

It's close here, but will also need to be able to select the proper
template in the case where a nickname is already chosen.
empires.js
tictactoe.js