Example #1
0
        public async Task <int> InsertBefore(BotAction action)
        {
            int count = action.getChangeCount();

            action.PrevAction = this.PrevAction;
            action.NextAction = this;
            this.PrevAction   = action;

            count += this.mergeForwardOld();

            int depth = await action.ReCalculateAndReSend();

            Program.CurLeaderboard.InvokeChange(count);
            Program.Controller.SerializeActions();

            return(depth);
        }
Example #2
0
        public async Task InsertAfter(BotAction action)
        {
            int count = action.getChangeCount();

            if (this.NextAction != null)
            {
                count += this.NextAction.mergeForwardOld();
            }

            action.NextAction = this.NextAction;
            action.PrevAction = this;
            this.NextAction   = action;

            await action.ReCalculateAndReSend();

            Program.CurLeaderboard.InvokeChange(count);
            Program.Controller.SerializeActions();
        }