Exemplo n.º 1
0
        public async Task AnimateMoveComputerCardstoCrib(List <CardCtrl> computerCribCards, bool moveCards = true)
        {
            double beginTime         = 0;
            var    taskList          = new List <Task>();
            var    animationDuration = FlipAnimationDuration;

            if (_firstDeal)
            {
                animationDuration *= 4;
                _firstDeal         = false;
            }

            var tList = CardGrid.MoveListOfCards(_cgComputer, _cgCrib, computerCribCards, animationDuration,
                                                 beginTime);

            if (tList != null)
            {
                taskList.AddRange(tList);
            }

            await Task.WhenAll(taskList);

            if (moveCards)
            {
                CardGrid.TransferCards(_cgComputer, _cgCrib, computerCribCards);
            }
        }