     hash = CryptoJS.SHA3(uuid, {outputLength: 256}).toString()
     this.setUserId(hash)
 
-  # Submits the provided game's current action and swaps the current player.
+  # Submits the provided game's current action. If this ends the game,
+  # populates the "victors" array. Otherwise, changes the current player.
   # Validates that the current action is a legal one.
   submitCurrentAction: (gameId) ->
     game = getGame(gameId)

#   profiles: (Map<String, Profile>) A mapping from player IDs to profile
#       information about the player, such
#   currentPlayerNumber: (Integer) The number of the player whose turn it is,
#       that is, their index within the players array.
#   resignedPlayers: ([String]) An array of players who were previously in the
#       game, but who have subsequently left the game. They might still have
#       in-game Actions associated with their playerId.
#   currentAction: (String) ID of action currently being constructed, or null if
#       no action is under construction. Should never point to a submitted
#       action.
#   requestId: (String) Facebook request ID associated with this game
#   victors: ([String]) List of IDs of the players who won this game. In the
#       case of a draw, it should contain all of the drawing players. This field
#       should not be present if the game is still in progress.
# }
#
# An Action is defined as follows:


# Returns a 2-dimensional array of *submitted* game actions spatially indexed
# by [column][row], so e.g. table[0][2] is the bottom-left square's action.
makeActionTable = (gameId, currentActionId) ->
  result = [[], [], []]
  noughts.Actions.find({gameId: gameId, submitted: true}).forEach (action) ->
    for command in action.commands
