예제 #1
0
        public static SbScratchPad ToSbScratchPad(this StageBits stageBits)
        {
            var overlaps = stageBits.Order.SquareArrayCoords()
                           .Select(t =>
                                   new SbSpItem(row: t.Item1,
                                                col: t.Item2,
                                                overlap: stageBits.Overlap(row: t.Item1, col: t.Item2)));

            var scratchPad = new SbScratchPad(
                overlaps: overlaps,
                order: stageBits.Order);

            return(scratchPad);
        }
예제 #2
0
 public static string PrintOverlaps(this SbScratchPad sbScratchPad)
 {
     return(StringFuncs.GridFormat(sbScratchPad.Order, sbScratchPad.Order,
                                   (r, c) => $"{sbScratchPad.Overlap(r, c).Overlap}"));
 }