]> git.cworth.org Git - empires-server/commit
empires: Rename add_player to register_player
authorCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 12:54:35 +0000 (05:54 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 12:54:35 +0000 (05:54 -0700)
commitdbeeca917db24aaaffabc63072365f31ac2652ab
tree602d8aeebb9b00970adcae728c9ca3f4018e5f73
parent9d73dc393cf84f6473304528f09e7b8696ed6510
empires: Rename add_player to register_player

We still haven't yet ported the Empires implementation to play nicely
with all of the new functionality in the base Game class. In
particular, Game now has a base "add_player" method with different
semantics than the older "add_player" method in Empires.

To avoid Empires.add_player from being inadvertently called, we rename
it here to register_player.

This fixes, for the moment, a failure when trying to create a new
Empires game of:

    TypeError: player.remove_connection is not a function
empires.js