/// <summary>
        /// Advances the input frame coutner for a remote client,
        /// and calculates a remoteFrameLag value for that client.
        /// </summary>
        /// <param name="localIdentifier"></param>
        /// <param name="identifier"></param>
        public virtual URollbackErrorCode AddRemoteInput(int localIdentifier, int remoteIdentifier, ClientInputDefinition clientInput)
        {
            if (!clients.ContainsKey(remoteIdentifier) ||
                !clients.ContainsKey(localIdentifier))
            {
                return(URollbackErrorCode.INVALID_CLIENT);
            }
            URollbackClient localClient  = GetClient(localIdentifier);
            URollbackClient remoteClient = GetClient(remoteIdentifier);

            remoteClient.AddInput(clientInput);
            remoteClient.AddRemoteFrameLag(localClient.InputFrame);
            return(URollbackErrorCode.OK);
        }
        /// <summary>
        /// Adds an input for the local client, and adds a
        /// localFrameLag value for remote clients.
        /// </summary>
        /// <param name="identifier"></param>
        public virtual URollbackErrorCode AddLocalInput(int identifier, ClientInputDefinition clientInput)
        {
            if (!clients.ContainsKey(identifier))
            {
                return(URollbackErrorCode.INVALID_CLIENT);
            }

            URollbackClient localClient = GetClient(identifier);

            localClient.AddInput(clientInput);
            OnAdvanceLocalInput?.Invoke(identifier);

            // Calculate how many frames we're predicting for remote client(s).
            foreach (URollbackClient remoteClient in clients.Values)
            {
                if (remoteClient != localClient)
                {
                    remoteClient.AddLocalFrameLag(localClient.InputFrame);
                }
            }
            return(URollbackErrorCode.OK);
        }