Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	native/project/jni/ChessBoard.cpp
  • Loading branch information
jcarolus committed Jun 14, 2019
2 parents 4a67128 + 72eef43 commit dea6ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion native/project/jni/ChessBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,7 @@ void ChessBoard::calcQuality()
////////////////////////////////////////////////////////////////////////////////

// pre-calculated array of 64 bits BITBOARD values for the squares
const BITBOARD ChessBoard::BITS[64] = {1LL, 2LL, 4LL, 8LL, 16LL, 32LL, 64LL, 128LL, 256LL, 512LL, 1024LL, 2048LL, 4096LL, 8192LL, 16384LL, 32768LL, 65536LL, 131072LL, 262144LL, 524288LL, 1048576LL, 2097152LL, 4194304LL, 8388608LL, 16777216LL, 33554432LL, 67108864LL, 134217728LL, 268435456LL, 536870912LL, 1073741824LL, 2147483648LL, 4294967296LL, 8589934592LL, 17179869184LL, 34359738368LL, 68719476736LL, 137438953472LL, 274877906944LL, 549755813888LL, 1099511627776LL, 2199023255552LL, 4398046511104LL, 8796093022208LL, 17592186044416LL, 35184372088832LL, 70368744177664LL, 140737488355328LL, 281474976710656LL, 562949953421312LL, 1125899906842624LL, 2251799813685248LL, 4503599627370496LL, 9007199254740992LL, 18014398509481984LL, 36028797018963968LL, 72057594037927936LL, 144115188075855872LL, 288230376151711744LL, 576460752303423488LL, 1152921504606846976LL, 2305843009213693952LL, 4611686018427387904LL, (BITBOARD)-9223372036854775808ULL};
const BITBOARD ChessBoard::BITS[64] = {1LL, 2LL, 4LL, 8LL, 16LL, 32LL, 64LL, 128LL, 256LL, 512LL, 1024LL, 2048LL, 4096LL, 8192LL, 16384LL, 32768LL, 65536LL, 131072LL, 262144LL, 524288LL, 1048576LL, 2097152LL, 4194304LL, 8388608LL, 16777216LL, 33554432LL, 67108864LL, 134217728LL, 268435456LL, 536870912LL, 1073741824LL, 2147483648LL, 4294967296LL, 8589934592LL, 17179869184LL, 34359738368LL, 68719476736LL, 137438953472LL, 274877906944LL, 549755813888LL, 1099511627776LL, 2199023255552LL, 4398046511104LL, 8796093022208LL, 17592186044416LL, 35184372088832LL, 70368744177664LL, 140737488355328LL, 281474976710656LL, 562949953421312LL, 1125899906842624LL, 2251799813685248LL, 4503599627370496LL, 9007199254740992LL, 18014398509481984LL, 36028797018963968LL, 72057594037927936LL, 144115188075855872LL, 288230376151711744LL, 576460752303423488LL, 1152921504606846976LL, 2305843009213693952LL, 4611686018427387904LL, static_cast<BITBOARD>(-9223372036854775808ULL)};
// above array, but ~
const BITBOARD ChessBoard::NOT_BITS[64] = {(BITBOARD)-2LL, (BITBOARD)-3LL, (BITBOARD)-5LL, (BITBOARD)-9LL, (BITBOARD)-17LL, (BITBOARD)-33LL, (BITBOARD)-65LL, (BITBOARD)-129LL, (BITBOARD)-257LL, (BITBOARD)-513LL, (BITBOARD)-1025LL, (BITBOARD)-2049LL, (BITBOARD)-4097LL, (BITBOARD)-8193LL, (BITBOARD)-16385LL, (BITBOARD)-32769LL, (BITBOARD)-65537LL, (BITBOARD)-131073LL, (BITBOARD)-262145LL, (BITBOARD)-524289LL, (BITBOARD)-1048577LL, (BITBOARD)-2097153LL, (BITBOARD)-4194305LL, (BITBOARD)-8388609LL, (BITBOARD)-16777217LL, (BITBOARD)-33554433LL, (BITBOARD)-67108865LL, (BITBOARD)-134217729LL, (BITBOARD)-268435457LL, (BITBOARD)-536870913LL, (BITBOARD)-1073741825LL, (BITBOARD)-2147483649LL, (BITBOARD)-4294967297LL, (BITBOARD)-8589934593LL, (BITBOARD)-17179869185LL, (BITBOARD)-34359738369LL, (BITBOARD)-68719476737LL, (BITBOARD)-137438953473LL, (BITBOARD)-274877906945LL, (BITBOARD)-549755813889LL, (BITBOARD)-1099511627777LL, (BITBOARD)-2199023255553LL, (BITBOARD)-4398046511105LL, (BITBOARD)-8796093022209LL, (BITBOARD)-17592186044417LL, (BITBOARD)-35184372088833LL, (BITBOARD)-70368744177665LL, (BITBOARD)-140737488355329LL, (BITBOARD)-281474976710657LL, (BITBOARD)-562949953421313LL, (BITBOARD)-1125899906842625LL, (BITBOARD)-2251799813685249LL, (BITBOARD)-4503599627370497LL, (BITBOARD)-9007199254740993LL, (BITBOARD)-18014398509481985LL, (BITBOARD)-36028797018963969LL, (BITBOARD)-72057594037927937LL, (BITBOARD)-144115188075855873LL, (BITBOARD)-288230376151711745LL, (BITBOARD)-576460752303423489LL, (BITBOARD)-1152921504606846977LL, (BITBOARD)-2305843009213693953LL, (BITBOARD)-4611686018427387905LL, 9223372036854775807LL};

Expand Down
3 changes: 2 additions & 1 deletion native/project/jni/chess-jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static void *search_thread(void* arg){
if (jvm->DetachCurrentThread() != JNI_OK) {
DEBUG_PRINT("Could not deattach from current thread\n", 0);
}
return NULL;
}


Expand Down Expand Up @@ -144,7 +145,7 @@ JNIEXPORT void JNICALL Java_jwtc_chess_JNI_setCastlingsEPAnd50( JNIEnv* env, job
}
JNIEXPORT int JNICALL Java_jwtc_chess_JNI_getNumBoard( JNIEnv* env, jobject thiz)
{
stGame->getBoard()->getNumBoard();
return stGame->getBoard()->getNumBoard();
}
JNIEXPORT void JNICALL Java_jwtc_chess_JNI_commitBoard( JNIEnv* env, jobject thiz)
{
Expand Down

0 comments on commit dea6ecf

Please sign in to comment.