Beispiel #1
0
        public BitPlane Parse(BitPlane group, BitPlane allStones)
        {
            var ret = new BitPlane(allStones.Width, allStones.Height);

            foreach (var coords in group.Unabled)
            {
                var liberties = AnalyticHelper.HortogonalCoord(coords).Where(
                    x => allStones.InOfRange(x) && !allStones[x]
                    );
                ret.AddRange(liberties);
            }

            return(ret);
        }
Beispiel #2
0
        public List <BitPlane> Parse(BitPlane stones)
        {
            var ret   = new List <BitPlane>();
            var scope = stones.Copy();

            while (scope.Unabled.Any())
            {
                var grp = GroupWalker(scope, scope.Unabled.First());
                var bp  = new BitPlane(stones.Width, stones.Height);
                bp.AddRange(grp);
                ret.Add(bp);
            }

            return(ret);
        }