private void OnChainIncrement(int aChainLength, HashSet <AbstractBlock> aMatchedBlocks)
        {
            Console.WriteLine($"Chain {aChainLength}!");
            myChainTimer = Math.Max(1.0f, myChainTimer + 1.0f);

            AbstractBlock rightMostTopMostBlock = aMatchedBlocks.First();

            foreach (AbstractBlock block in aMatchedBlocks)
            {
                if (block.GetPosition().X > rightMostTopMostBlock.GetPosition().X)
                {
                    rightMostTopMostBlock = block;
                }
                else if (block.GetPosition().X == rightMostTopMostBlock.GetPosition().X)
                {
                    if (block.GetPosition().Y > rightMostTopMostBlock.GetPosition().Y)
                    {
                        rightMostTopMostBlock = block;
                    }
                }
            }

            Vector2 blockScreenPosition = rightMostTopMostBlock.GetScreenPosition(myOffset, myGridContainer.GetInitialHeight() - 1, myRaisingOffset);
            Vector2 feedbackOffset      = new Vector2(AbstractBlock.GetTileSize(), AbstractBlock.GetTileSize()) / 2f;
            Vector2 feedbackPosition    = blockScreenPosition + feedbackOffset;

            FeedbackManager.AddFeedback(new ChainComboFeedback("x", aChainLength, feedbackPosition));
        }
        private void OnCombo(HashSet <AbstractBlock> aMatchedBlocks)
        {
            Console.WriteLine($"Combo! {aMatchedBlocks.Count}");
            const float MagicNumber = 0.3f;

            if (myChainTimer < 0.0f)
            {
                myChainTimer = 0.0f;
            }
            myChainTimer += (aMatchedBlocks.Count * MagicNumber) / myModifiedGameSpeed;
            CreateAngryComboBlock(aMatchedBlocks.Count - 1);

            AbstractBlock rightMostTopMostBlock = aMatchedBlocks.First();

            foreach (AbstractBlock block in aMatchedBlocks)
            {
                if (block.GetPosition().X > rightMostTopMostBlock.GetPosition().X)
                {
                    rightMostTopMostBlock = block;
                }
                else if (block.GetPosition().X == rightMostTopMostBlock.GetPosition().X)
                {
                    if (block.GetPosition().Y > rightMostTopMostBlock.GetPosition().Y)
                    {
                        rightMostTopMostBlock = block;
                    }
                }
            }

            Vector2 blockScreenPosition = rightMostTopMostBlock.GetScreenPosition(myOffset, myGridContainer.GetInitialHeight() - 1, myRaisingOffset);
            Vector2 feedbackOffset      = new Vector2(AbstractBlock.GetTileSize(), AbstractBlock.GetTileSize()) / 2f;
            Vector2 feedbackPosition    = blockScreenPosition + feedbackOffset;

            FeedbackManager.AddFeedback(new ChainComboFeedback("", aMatchedBlocks.Count, feedbackPosition));
        }
        public void RemoveBlock(AbstractBlock aBlock, int aAmountOfDisappearingBlocks, int aCurrentBlock)
        {
            Point position = aBlock.GetPosition();

            int animationTime = 30;

            int delayBetweenAnimations = 15;

            int currentBlockDelta = aCurrentBlock * delayBetweenAnimations;

            int totalAnimationtime = aAmountOfDisappearingBlocks * delayBetweenAnimations + animationTime;

            int blockIndex = myGridBundle.Container.myBlocks.LastIndexOf(aBlock);

            if (blockIndex == -1)
            {
                return;
            }
            aBlock = new DisappearingBlock(myGridBundle, ((AbstractColorBlock)aBlock).GetColor(),
                                           totalAnimationtime,
                                           currentBlockDelta);

            myGridBundle.Container.InitializeBlock(position, aBlock);
        }