Lines Matching refs:to

78 	var to = (move >> 8) & 0xFF;
94 moveTo == to &&
114 } else if (pieceType == piecePawn && (g_board[to] != 0 || (move & moveflagEPC))) {
118 if (g_board[to] != 0 || (move & moveflagEPC)) {
122 result += FormatSquare(to);
337 var from, to, mob, pieceIdx;
363 to = from - 15; while (g_board[to] == 0) { to -= 15; mob++; }
364 if (g_board[to] & enemy) {
366 if (!(g_board[to] & piecePawn)) {
367 to -= 15; while (g_board[to] == 0) to -= 15;
368 mob += mobUnit[g_board[to]] << 2;
372 to = from - 17; while (g_board[to] == 0) { to -= 17; mob++; }
373 if (g_board[to] & enemy) {
375 if (!(g_board[to] & piecePawn)) {
376 to -= 17; while (g_board[to] == 0) to -= 17;
377 mob += mobUnit[g_board[to]] << 2;
381 to = from + 15; while (g_board[to] == 0) { to += 15; mob++; }
382 if (g_board[to] & enemy) {
384 if (!(g_board[to] & piecePawn)) {
385 to += 15; while (g_board[to] == 0) to += 15;
386 mob += mobUnit[g_board[to]] << 2;
390 to = from + 17; while (g_board[to] == 0) { to += 17; mob++; }
391 if (g_board[to] & enemy) {
393 if (!(g_board[to] & piecePawn)) {
394 to += 17; while (g_board[to] == 0) to += 17;
395 mob += mobUnit[g_board[to]] << 2;
408 to = from - 1; while (g_board[to] == 0) { to--; mob++;} if (g_board[to] & enemy) mob++;
409 to = from + 1; while (g_board[to] == 0) { to++; mob++; } if (g_board[to] & enemy) mob++;
410to = from + 16; while (g_board[to] == 0) { to += 16; mob++; } if (g_board[to] & enemy) mob++;
411to = from - 16; while (g_board[to] == 0) { to -= 16; mob++; } if (g_board[to] & enemy) mob++;
421to = from - 15; while (g_board[to] == 0) { to -= 15; mob++; } if (g_board[to] & enemy) mob++;
422to = from - 17; while (g_board[to] == 0) { to -= 17; mob++; } if (g_board[to] & enemy) mob++;
423to = from + 15; while (g_board[to] == 0) { to += 15; mob++; } if (g_board[to] & enemy) mob++;
424to = from + 17; while (g_board[to] == 0) { to += 17; mob++; } if (g_board[to] & enemy) mob++;
425 to = from - 1; while (g_board[to] == 0) { to--; mob++; } if (g_board[to] & enemy) mob++;
426 to = from + 1; while (g_board[to] == 0) { to++; mob++; } if (g_board[to] & enemy) mob++;
427to = from + 16; while (g_board[to] == 0) { to += 16; mob++; } if (g_board[to] & enemy) mob++;
428to = from - 16; while (g_board[to] == 0) { to -= 16; mob++; } if (g_board[to] & enemy) mob++;
630 var to = (hashMove >> 8) & 0xFF;
638 if (g_board[to] != 0 && (g_toMove == (g_board[to] & 0x8)))
646 var dir = to - from;
652 var row = to & 0xF0;
661 return g_board[to] == 0;
664 return g_board[to] != 0;
668 if (g_board[to] != 0) return false;
673 if (g_board[to] != 0) return false;
683 return IsSquareAttackableFrom(to, from);
1659 var to = (move >> 8) & 0xFF;
1661 var captured = g_board[to];
1663 var epcEnd = to;
1666 epcEnd = me ? (to + 0x10) : (to - 0x10);
1684 var rook = g_board[to + 1];
1686 g_hashKeyLow ^= g_zobristLow[to + 1][rook & 0xF];
1687 g_hashKeyHigh ^= g_zobristHigh[to + 1][rook & 0xF];
1688 g_hashKeyLow ^= g_zobristLow[to - 1][rook & 0xF];
1689 g_hashKeyHigh ^= g_zobristHigh[to - 1][rook & 0xF];
1691 g_board[to - 1] = rook;
1692 g_board[to + 1] = pieceEmpty;
1694 g_baseEval -= pieceSquareAdj[rook & 0x7][me == 0 ? flipTable[to + 1] : (to + 1)];
1695 g_baseEval += pieceSquareAdj[rook & 0x7][me == 0 ? flipTable[to - 1] : (to - 1)];
1697 var rookIndex = g_pieceIndex[to + 1];
1698 g_pieceIndex[to - 1] = rookIndex;
1699 g_pieceList[((rook & 0xF) << 4) | rookIndex] = to - 1;
1707 var rook = g_board[to - 2];
1709 g_hashKeyLow ^= g_zobristLow[to -2][rook & 0xF];
1710 g_hashKeyHigh ^= g_zobristHigh[to - 2][rook & 0xF];
1711 g_hashKeyLow ^= g_zobristLow[to + 1][rook & 0xF];
1712 g_hashKeyHigh ^= g_zobristHigh[to + 1][rook & 0xF];
1714 g_board[to + 1] = rook;
1715 g_board[to - 2] = pieceEmpty;
1717 g_baseEval -= pieceSquareAdj[rook & 0x7][me == 0 ? flipTable[to - 2] : (to - 2)];
1718 g_baseEval += pieceSquareAdj[rook & 0x7][me == 0 ? flipTable[to + 1] : (to + 1)];
1720 var rookIndex = g_pieceIndex[to - 2];
1721 g_pieceIndex[to + 1] = rookIndex;
1722 g_pieceList[((rook & 0xF) << 4) | rookIndex] = to + 1;
1742 var diff = to - from;
1745 g_enPassentSquare = me ? (to + 0x10) : (to - 0x10);
1752 g_hashKeyLow ^= g_zobristLow[to][piece & 0xF];
1753 g_hashKeyHigh ^= g_zobristHigh[to][piece & 0xF];
1757 g_castleRights &= g_castleRightsMask[from] & g_castleRightsMask[to];
1762 g_pieceIndex[to] = g_pieceIndex[from];
1763 g_pieceList[((piece & 0xF) << 4) | g_pieceIndex[to]] = to;
1776 g_hashKeyLow ^= g_zobristLow[to][piece & 0xF];
1777 g_hashKeyHigh ^= g_zobristHigh[to][piece & 0xF];
1778 g_board[to] = newPiece;
1779 g_hashKeyLow ^= g_zobristLow[to][newPiece & 0xF];
1780 g_hashKeyHigh ^= g_zobristHigh[to][newPiece & 0xF];
1782 g_baseEval += pieceSquareAdj[newPiece & 0x7][me == 0 ? flipTable[to] : to];
1792 g_pieceIndex[lastPawnSquare] = g_pieceIndex[to];
1795 g_pieceIndex[to] = g_pieceCount[promoteType];
1796 g_pieceList[(promoteType << 4) | g_pieceIndex[to]] = to;
1799 g_board[to] = g_board[from];
1801 g_baseEval += pieceSquareAdj[piece & 0x7][me == 0 ? flipTable[to] : to];
1821 if (epcEnd != to) {
1835 g_inCheck = IsSquareAttackableFrom(theirKingPos, to);
1843 if (epcEnd != to) {
1879 var to = (move >> 8) & 0xFF;
1882 var piece = g_board[to];
1886 var rook = g_board[to - 1];
1887 g_board[to + 1] = rook;
1888 g_board[to - 1] = pieceEmpty;
1890 var rookIndex = g_pieceIndex[to - 1];
1891 g_pieceIndex[to + 1] = rookIndex;
1892 g_pieceList[((rook & 0xF) << 4) | rookIndex] = to + 1;
1895 var rook = g_board[to + 1];
1896 g_board[to - 2] = rook;
1897 g_board[to + 1] = pieceEmpty;
1899 var rookIndex = g_pieceIndex[to + 1];
1900 g_pieceIndex[to - 2] = rookIndex;
1901 g_pieceList[((rook & 0xF) << 4) | rookIndex] = to - 2;
1906 piece = (g_board[to] & (~0x7)) | piecePawn;
1910 var promoteType = g_board[to] & 0xF;
1915 g_pieceIndex[lastPromoteSquare] = g_pieceIndex[to];
1918 g_pieceIndex[to] = g_pieceCount[pawnType];
1919 g_pieceList[(pawnType << 4) | g_pieceIndex[to]] = to;
1923 g_board[from] = g_board[to];
1926 var epcEnd = to;
1929 epcEnd = to + 0x10;
1931 epcEnd = to - 0x10;
1932 g_board[to] = pieceEmpty;
1938 g_pieceIndex[from] = g_pieceIndex[to];
2013 function GenerateMove(from, to) { argument
2014 return from | (to << 8);
2017 function GenerateMove(from, to, flags){
2018 return from | (to << 8) | flags;
2038 var from, to, piece, pieceIdx;
2052 to = from + 31; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2053 to = from + 33; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2054 to = from + 14; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2055 to = from - 14; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2056 to = from - 31; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2057 to = from - 33; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2058 to = from + 18; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2059 to = from - 18; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2067to = from - 15; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2068to = from - 17; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2069to = from + 15; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2070to = from + 17; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2078to = from - 1; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); to
2079to = from + 1; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); to
2080to = from + 16; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2081to = from - 16; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2089to = from - 15; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2090to = from - 17; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2091to = from + 15; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2092to = from + 17; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2093to = from - 1; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); to
2094to = from + 1; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); to
2095to = from + 16; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2096to = from - 16; while (g_board[to] == 0) { moveStack[moveStack.length] = GenerateMove(from, to); t…
2104 to = from - 15; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2105 to = from - 17; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2106 to = from + 15; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2107 to = from + 17; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2108 to = from - 1; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2109 to = from + 1; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2110 to = from - 16; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2111 to = from + 16; if (g_board[to] == 0) moveStack[moveStack.length] = GenerateMove(from, to);
2134 var from, to, piece, pieceIdx;
2142 to = from + inc - 1;
2143 if (g_board[to] & enemy) {
2144 MovePawnTo(moveStack, from, to);
2147 to = from + inc + 1;
2148 if (g_board[to] & enemy) {
2149 MovePawnTo(moveStack, from, to);
2174 to = from + 31; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2175 to = from + 33; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2176 to = from + 14; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2177 to = from - 14; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2178 to = from - 31; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2179 to = from - 33; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2180 to = from + 18; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2181 to = from - 18; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2189to = from; do { to -= 15; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2190to = from; do { to -= 17; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2191to = from; do { to += 15; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2192to = from; do { to += 17; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2200to = from; do { to--; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack.len…
2201to = from; do { to++; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack.len…
2202to = from; do { to -= 16; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2203to = from; do { to += 16; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2211to = from; do { to -= 15; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2212to = from; do { to -= 17; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2213to = from; do { to += 15; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2214to = from; do { to += 17; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2215to = from; do { to--; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack.len…
2216to = from; do { to++; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack.len…
2217to = from; do { to -= 16; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2218to = from; do { to += 16; } while (g_board[to] == 0); if (g_board[to] & enemy) moveStack[moveStack…
2226 to = from - 15; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2227 to = from - 17; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2228 to = from + 15; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2229 to = from + 17; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2230 to = from - 1; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2231 to = from + 1; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2232 to = from - 16; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2233 to = from + 16; if (g_board[to] & enemy) moveStack[moveStack.length] = GenerateMove(from, to);
2256 var to = from + inc;
2257 if (g_board[to] == 0) {
2258 MovePawnTo(moveStack, from, to, pieceEmpty);
2263 to += inc;
2264 if (g_board[to] == 0) {
2265 moveStack[moveStack.length] = GenerateMove(from, to);
2287 var to = (move >> 8) & 0xFF;
2292 var toValue = g_seeValues[g_board[to] & 0xF];
2309 if (((g_board[to + inc + 1] & 0xF) == (piecePawn | them)) ||
2310 ((g_board[to + inc - 1] & 0xF) == (piecePawn | them))) {
2320 SeeAddKnightAttacks(to, them, themAttacks);
2328 if (SeeAddSliderAttacks(to, them, themAttacks, pieceType)) {
2340 if (((g_board[to - inc + 1] & 0xF) == (piecePawn | us)) ||
2341 ((g_board[to - inc - 1] & 0xF) == (piecePawn | us))) {
2347 SeeAddSliderAttacks(to, them, themAttacks, pieceKing);
2351 SeeAddKnightAttacks(to, us, usAttacks);
2353 SeeAddSliderAttacks(to, us, usAttacks, pieceType);
2394 SeeAddXrayAttack(to, capturingPieceSquare, us, usAttacks, themAttacks);
2427 SeeAddXrayAttack(to, capturingPieceSquare, us, usAttacks, themAttacks);