INNER CODE UNIT · TypeScript
index
josefjadrny/js-chess-engine · src/index.ts:203
const index = rank * 8 + file;
const piece = this.board.mailbox[index];
const isWhiteSquare = (rank + file) % 2 === 0;
const symbol = pieceToUnicode(piece, isWhiteSquare);
process.stdout.write(symbol);
}
process.stdout.write('\n');
}
process.stdout.write(' ABCDEFGH\n');
}
/**
* Make an AI move (v1 compatible - returns only the move)
*
* @deprecated Use `ai()` instead. This method will be removed in v3.0.0.