fixed? getLegalMoves

This commit is contained in:
ramollia
2025-12-04 19:36:38 +01:00
parent 788cf08b49
commit 7ea45586ae
2 changed files with 3 additions and 3 deletions

View File

@@ -93,12 +93,12 @@ public class BitboardReversi extends BitboardGame<BitboardReversi> {
final long nextLegalMoves = getLegalMoves2();
if (nextLegalMoves <= 0) {
if (nextLegalMoves == 0) {
nextTurn();
final long skippedLegalMoves = getLegalMoves2();
if (skippedLegalMoves <= 0) {
if (skippedLegalMoves == 0) {
final long black = getPlayerBitboard(0);
final long white = getPlayerBitboard(1);

View File

@@ -50,7 +50,7 @@ public class BitboardTicTacToe extends BitboardGame<BitboardTicTacToe> {
return GameState.WIN;
}
if (getLegalMoves2() <= 0L || checkEarlyDraw()) {
if (getLegalMoves2() == 0L || checkEarlyDraw()) {
return GameState.DRAW;
}