private void FinnishAngryBops(List <AbstractBlock> aPreviousBlocks)
 {
     foreach (var block in aPreviousBlocks)
     {
         AngryBlock angryBlock = block as AngryBlock;
         angryBlock.HandleDisintegrating();
     }
 }
        public void HandleBop(AbstractBlock aBlock)
        {
            AngryBlock angryBlock = aBlock as AngryBlock;

            if (angryBlock.IsContaminated())
            {
                angryBlock.ResolveContamination();
            }
            if (angryBlock.IsDead())
            {
                myFrozenBlocks.Add(myGridBundle.Generator.GenerateFrozenBlockAtPosition(angryBlock.GetPosition()));
                myAngryBlocks.Remove(angryBlock);
            }
        }
        public AngryBlockBundle CreateAngryBlockBundleAtPosition(Point aPosition, int aWidth, int aHeight) //TETRIS!!
        {
            AngryBlockBundle angryBundle = new AngryBlockBundle(myGridBundle);

            if (aPosition.Y + aHeight > myGridBundle.Container.GetInitialHeight())
            {
                ExpandToHeight(aPosition.Y + aHeight);
            }

            for (int y = 0; y < aHeight; y++)
            {
                for (int x = 0; x < aWidth; x++)
                {
                    AngryBlock tempy = new AngryBlock(myGridBundle, y + 1, angryBundle);
                    tempy.LoadContent();
                    myGridBundle.Container.SetBlock(new Point(aPosition.X + x, aPosition.Y + y), tempy);
                }
            }
            angryBundle.Initialize(myNextAngryIndex++);
            return(angryBundle);
        }
 public void AddBlock(AngryBlock aBlock)
 {
     myAngryBlocks.Add(aBlock);
 }