 #   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.
+#       that is, their index within the players array. Null when the game is not
+#       in progress.
 #   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.
+#       no action is under construction (or the game is over). Should never
+#       point to a submitted action. Null when the game is not in progress.
 #   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.
+#       case of a draw, it should contain all of the drawing players. In the
+#       case of a "nobody wins" situation, an empty list should be present. This
+#       field cannot be present on a game which is still in progress.
 # }
 #
 # An Action is defined as follows:

    hash = CryptoJS.SHA3(uuid, {outputLength: 256}).toString()
    this.setUserId(hash)

  # Submits the provided game's current action and swaps the current player.
  # Validates that the current action is a legal one.
  submitCurrentAction: (gameId) ->
    game = getGame(gameId)


# 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
