Lines Matching refs:Row
13 constexpr Board addQueen(int Row, int Col) const {
14 return Board(State | ((uint64_t)Row << (Col * 4)));
19 constexpr bool ok(int Row, int Col) const {
20 return okRecurse(Row, Col, 0);
22 constexpr bool okRecurse(int Row, int Col, int CheckCol) const {
24 getQueenRow(CheckCol) == Row ? false :
25 getQueenRow(CheckCol) == Row + (Col - CheckCol) ? false :
26 getQueenRow(CheckCol) == Row + (CheckCol - Col) ? false :
27 okRecurse(Row, Col, CheckCol + 1);
29 constexpr bool at(int Row, int Col) const {
30 return getQueenRow(Col) == Row;
36 constexpr Board buildBoardScan(int N, int Col, int Row, const Board &B);
38 int N, int Col, int Row, const Board &B) {
39 return Try.Failed ? buildBoardScan(N, Col, Row, B) : Try;
41 constexpr Board buildBoardScan(int N, int Col, int Row, const Board &B) {
42 return Row == N ? Board(0, true) :
43 B.ok(Row, Col) ?
44 tryBoard(buildBoardRecurse(N, Col + 1, B.addQueen(Row, Col)),
45 N, Col, Row+1, B) :
46 buildBoardScan(N, Col, Row + 1, B);
57 constexpr bool Board::check(const char *p, int Row, int Col) const {
59 *p == '\n' ? check(p+1, Row+1, 0) :
60 *p == 'o' ? at(Row, Col) && check(p+1, Row, Col+1) :
61 *p == '-' ? !at(Row, Col) && check(p+1, Row, Col+1) :