Example #1
0
        public override string ToString()
        {
            StringBuilder lStringBuilder = new StringBuilder();

            lStringBuilder.AppendLine(".." + Defender.ToString2() + " Color Enclosed Region #" + _RegionNbr + " At: " + Board.Coord.ToString(Members[0].MemberList[0]));

            lStringBuilder.Append("....Members Block: (" + Members.Count + ") ");
            foreach (GoBlockBase lGoBlockBase in Members)
            {
                lStringBuilder.Append(Board.Coord.ToString(lGoBlockBase.Members.GetFirst()) + " ");
            }
            lStringBuilder.AppendLine();

            lStringBuilder.Append("....Neighbors Blocks: (" + Neighbors.Count + ") ");
            foreach (GoBlockBase lGoBlockBase in Neighbors)
            {
                lStringBuilder.Append(Board.Coord.ToString(lGoBlockBase.Members.GetFirst()) + " ");
            }
            lStringBuilder.AppendLine();

            lStringBuilder.Append("....Enclosing Blocks: (" + EnclosingBlocks.Count + ") ");
            foreach (GoBlockBase lGoBlock in EnclosingBlocks)
            {
                lStringBuilder.Append(Board.Coord.ToString(lGoBlock.Members.GetFirst()) + " ");
            }
            lStringBuilder.AppendLine();

            lStringBuilder.Append("....Interior Defender Blocks: (" + InteriorDefenderBlocks.Count + ") ");
            foreach (GoBlockBase lGoBlock in InteriorDefenderBlocks)
            {
                lStringBuilder.Append(Board.Coord.ToString(lGoBlock.Members.GetFirst()) + " ");
            }
            lStringBuilder.AppendLine();

            lStringBuilder.Append("....Interior Attacker Blocks: (" + InteriorAttackerBlocks.Count + ") ");
            foreach (GoBlockBase lGoBlock in InteriorAttackerBlocks)
            {
                lStringBuilder.Append(Board.Coord.ToString(lGoBlock.Members.GetFirst()) + " ");
            }
            lStringBuilder.AppendLine();

            lStringBuilder.AppendLine("....Is Small Enclosed: " + IsSmall.ToString());
            //			lStringBuilder.AppendLine("....Total Empty Region: ");
            //			lStringBuilder.AppendLine(TotalEmptyRegion.ToString());

            lStringBuilder.AppendLine("....Is 1-Vital: " + Is1Vital.ToString());
            lStringBuilder.AppendLine("....Is 2-Vital: " + Is2Vital.ToString());

            lStringBuilder.AppendLine("....Has Interior: " + (EmptyArea.HasInterior() ? "Yes" : "No"));
            //			lStringBuilder.Append("Accessible Liberties:\n" + AccessibleLiberties.ToString());
            lStringBuilder.Append("Empty Area:\n" + EmptyArea.ToString());
            lStringBuilder.Append("Attackers Eye Area:\n" + AttackersEyeArea.ToString());
            lStringBuilder.Append("Enclosed Region:\n" + EnclosedArea.ToString());


            return(lStringBuilder.ToString().TrimEnd('\n'));
        }