Пример #1
0
        public virtual Task SelfActivate(Direction direction)
        {
            ICell targetCell = GetTargetCell(direction);

            if (targetCell == null)
            {
                return(ValidateHandling());
            }
            else
            {
                if (targetCell.CanHandle(this))
                {
                    return(targetCell.Handle(this, AttachedCell));
                }
                else
                {
                    return(Task.Delay(0));
                }
            }
        }