public static BoardSlotChangedEventArgs FromBoardSlot(BoardSlot slot, BoardSlotChangeOrigin origin)
 {
     return(new BoardSlotChangedEventArgs()
     {
         Position = slot.GetPosition(), Slot = slot, Origin = origin
     });
 }
        public void UpdateBoardSlot(BoardSlot boardSlot, BoardSlotChangeOrigin origin)
        {
            BoardBlock bBlock = GetBoardBlock(boardSlot.GetPosition());

            if (boardSlot.IsEmpty())
            {
                bBlock.BlockColor     = "";
                bBlock.BlockTextColor = "";
                bBlock.BlockValue     = "";
            }
            else
            {
                Block block = boardSlot.GetBlock();

                if (origin == BoardSlotChangeOrigin.Spawned)
                {
                    ScaleHelper.ScaleIn(bBlock);
                }
                else if (origin == BoardSlotChangeOrigin.MergedInto)
                {
                    ScaleHelper.Pulse(bBlock);
                }

                bBlock.BlockColor     = ColorTranslator.ToHtml(block.BackgroundColor);
                bBlock.BlockTextColor = ColorTranslator.ToHtml(block.Color);
                bBlock.BlockValue     = block.Value.ToString();
            }
        }