fixed GetPieceType function
This commit is contained in:
1 parent
5952d8ade4
commit
8e26cc1013
3 files changed
+7
-1
No files matched your search
@@ -20,11 +20,15 @@ static int ScoreMove(Board &board, Move &move) {
|
||||
const int attackerType = board.GetPieceType(move.MoveFrom());
|
||||
const int targetType = board.GetPieceType(move.MoveTo());
|
||||
|
||||
if (attackerType == nullPieceType || targetType == nullPieceType) return 0;
|
||||
|
||||
TTEntry *current = &TTable[board.hashKey % hashSize];
|
||||
if (current->bestMove == move) {
|
||||
return 50000;
|
||||
}
|
||||
|
||||
if (attackerType == -1 || targetType == -1) std::cout << "asd\n";
|
||||
|
||||
if (move.IsCapture()) {
|
||||
return moveScoreTable[attackerType][targetType] + 10000;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user