Skip to content

Commit

Permalink
fix worker check error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomitank committed Apr 7, 2021
1 parent c410327 commit c50edb0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tomitankChess.js
Expand Up @@ -1426,7 +1426,7 @@ var CHESS_BOARD = [ BLACK_ROOK, BLACK_KNIGHT, BLACK_BISHOP, BLACK_QUEEN, BLA
var bNumPawns = brd_pieceCount[BLACK_PAWN];

// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// DONTETLEN
// DONTETLEN
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

if (wNumPawns == 0 && bNumPawns == 0) { // Nincs Gyalog
Expand Down Expand Up @@ -1534,7 +1534,7 @@ var CHESS_BOARD = [ BLACK_ROOK, BLACK_KNIGHT, BLACK_BISHOP, BLACK_QUEEN, BLA
var bCanAttack = bNumQueens && (bNumKnights || bNumBishops || bNumRooks || bNumQueens >= 2);

// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// BABUK ERTEKELESE
// BABUK ERTEKELESE
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

// Feher Kiraly
Expand Down Expand Up @@ -3468,7 +3468,7 @@ var CHESS_BOARD = [ BLACK_ROOK, BLACK_KNIGHT, BLACK_BISHOP, BLACK_QUEEN, BLA
console.log('depth: '+depth+ ' score: '+score+' nodes: '+Nodes+' time: '+time+' pv:'+pvLine);*/
}
else // WebWorker, Node.js, JSUCI
else // Worker, Node.js, JSUCI
{
var time = (Date.now() - StartTime); // Keresesi ido

Expand Down Expand Up @@ -3504,7 +3504,7 @@ var CHESS_BOARD = [ BLACK_ROOK, BLACK_KNIGHT, BLACK_BISHOP, BLACK_QUEEN, BLA
function sendMessage(msg) {
if (UI_HOST == HOST_NODEJS) { // Node.js
nodefs.writeSync(1, msg+'\n');
} else if (UI_HOST != HOST_WEB) { // WebWorker, JSUCI
} else if (UI_HOST != HOST_WEB) { // Worker, JSUCI
postMessage(msg);
}
}
Expand All @@ -3518,7 +3518,7 @@ var CHESS_BOARD = [ BLACK_ROOK, BLACK_KNIGHT, BLACK_BISHOP, BLACK_QUEEN, BLA
var HOST_WORKER = 4;
var UI_HOST = HOST_WEB;

if (typeof Worker != 'undefined') { // WebWorker
if (typeof WorkerGlobalScope != 'undefined') { // Worker

UI_HOST = HOST_WORKER;

Expand Down

0 comments on commit c50edb0

Please sign in to comment.