protected void CreateRegions(Color color)
        {
            int lColorIndex = color.ToInteger();

            Regions[lColorIndex] = new List <ColorEnclosedRegion>();
            List <GoEmptyBlock> lReviewed = new List <GoEmptyBlock>();

            foreach (GoBlockBase lGoBlockBase in Board.AllBlocks)
            {
                if (lGoBlockBase.IsEmptyBlock())
                {
                    GoEmptyBlock lGoEmptyBlock = (GoEmptyBlock)lGoBlockBase;
                    if (!lReviewed.Contains(lGoEmptyBlock))
                    {
                        ColorEnclosedRegion lColorEnclosedRegion = new ColorEnclosedRegion(lGoEmptyBlock, color);

                        Regions[lColorIndex].Add(lColorEnclosedRegion);

                        foreach (GoBlockBase lGoBlockBase2 in lColorEnclosedRegion.Members)
                        {
                            if (lGoBlockBase2.IsEmptyBlock())
                            {
                                lReviewed.Add((GoEmptyBlock)lGoBlockBase2);
                            }
                        }
                    }
                }
            }
        }
        public string ToStringEnclosedBlockDump(int index)
        {
            CreateEnclosedRegions();
            StringBuilder lStringBuilder = new StringBuilder();

            ColorEnclosedRegion ColorEnclosedRegion0 = ColorEnclosedRegions.FindRegion(Color.Black, index);

            if (ColorEnclosedRegion0 != null)
            {
                lStringBuilder.AppendLine("Black: ");
                lStringBuilder.Append(ColorEnclosedRegion0.ToString());
            }

            ColorEnclosedRegion ColorEnclosedRegion1 = ColorEnclosedRegions.FindRegion(Color.White, index);

            if (ColorEnclosedRegion1 != null)
            {
                lStringBuilder.AppendLine("White: ");
                lStringBuilder.Append(ColorEnclosedRegion1.ToString());
            }

            return(lStringBuilder.ToString());
        }
        protected void CreateRegions(Color color)
        {
            int lColorIndex = color.ToInteger();

            Regions[lColorIndex] = new List<ColorEnclosedRegion>();
            List<GoEmptyBlock> lReviewed = new List<GoEmptyBlock>();

            foreach (GoBlockBase lGoBlockBase in Board.AllBlocks)
            {
                if (lGoBlockBase.IsEmptyBlock())
                {
                    GoEmptyBlock lGoEmptyBlock = (GoEmptyBlock)lGoBlockBase;
                    if (!lReviewed.Contains(lGoEmptyBlock))
                    {
                        ColorEnclosedRegion lColorEnclosedRegion = new ColorEnclosedRegion(lGoEmptyBlock, color);

                        Regions[lColorIndex].Add(lColorEnclosedRegion);

                        foreach (GoBlockBase lGoBlockBase2 in lColorEnclosedRegion.Members)
                            if (lGoBlockBase2.IsEmptyBlock())
                                lReviewed.Add((GoEmptyBlock)lGoBlockBase2);
                    }
                }
            }
        }