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); }
public static IEnumerable <ICoords> NobiWalk(BitPlane scope, ICoords target) { return(HortogonalCoord(target).Where(x => scope.InOfRange(x) && scope[x])); }