public BoardGenerator(BinairoBoardChecker checker, BinairoRows validRows, int size) { this.validRows = validRows; this.size = size; this.checker = checker; ushort mask = (ushort)(((ushort)0b1111_1111_1111_1111) << (16 - size)); fullMask = Enumerable.Repeat(mask, size).ToArray(); switch (size) { case 6: strategy = new BoardGenerator6x6(validRows, checker, fullMask); break; case 8: strategy = new BoardGenerator8x8(validRows, checker, fullMask); break; default: throw new ArgumentException(message: "Only supports size 6, 8, 10 or 12"); } }
public BoardGenerator6x6(BinairoRows validRows, BinairoBoardChecker boardChecker, ushort[] fullMask) { this.boardChecker = boardChecker; this.validRows = validRows; this.fullMask = fullMask; }
public BinairoRowChecker(BinairoRows validRows, int size) { this.validRows = validRows; this.validRowsLength = validRows.Length; this.size = size; }