From: Carl Worth Date: Fri, 5 Jun 2020 20:56:45 +0000 (-0700) Subject: Move some checks from TicTacToe.add_move to Game.add_move X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=041cdbd90052345df5a05779ada61aec53e403d4;hp=041cdbd90052345df5a05779ada61aec53e403d4;p=empires-server Move some checks from TicTacToe.add_move to Game.add_move Specifically, the checks for whether the player who submitted a move belongs on a team and belongs to the team that has the next move. These checks belong in the generic Game class so that future games won't have to maintain their own copies of these implementations. Previously, we were using the presence of the "add_move" property on a game class to determine whether to add the "/move" route. Now that we are adding add_move to the base class, we have to check specifically whether the child class has its own add_move (with hasOwnProperty('add_move')) to know whether the "/move" route should be added. ---