diff --git a/CuckooChessEngine/src/main/java/chess/TranspositionTable.java b/CuckooChessEngine/src/main/java/chess/TranspositionTable.java index b0141d3..d9d820a 100644 --- a/CuckooChessEngine/src/main/java/chess/TranspositionTable.java +++ b/CuckooChessEngine/src/main/java/chess/TranspositionTable.java @@ -150,7 +150,7 @@ public class TranspositionTable { altEnt.move = ent.move; altEnt.score = ent.score; altEnt.depthSlot = ent.depthSlot; - altEnt.generation = (byte)ent.generation; + altEnt.generation = ent.generation; altEnt.type = ent.type; altEnt.setHashSlot(1 - ent.getHashSlot()); altEnt.evalScore = ent.evalScore; @@ -173,7 +173,7 @@ public class TranspositionTable { ent.key = key; ent.setScore(sm.score, ply); ent.setDepth(depth); - ent.generation = (byte)generation; + ent.generation = generation; ent.type = (byte)type; ent.setHashSlot(hashSlot); ent.evalScore = (short)evalScore; @@ -185,13 +185,13 @@ public class TranspositionTable { int idx0 = h0(key); TTEntry ent = table[idx0]; if (ent.key == key) { - ent.generation = (byte)generation; + ent.generation = generation; return ent; } int idx1 = h1(key); ent = table[idx1]; if (ent.key == key) { - ent.generation = (byte)generation; + ent.generation = generation; return ent; } return emptySlot; diff --git a/CuckooChessEngine/src/main/java/chess/TreeLogger.java b/CuckooChessEngine/src/main/java/chess/TreeLogger.java index a183dcc..c36dc36 100644 --- a/CuckooChessEngine/src/main/java/chess/TreeLogger.java +++ b/CuckooChessEngine/src/main/java/chess/TreeLogger.java @@ -152,7 +152,7 @@ public final class TreeLogger { * @return node index */ final long logNodeStart(long parentIndex, Move m, int alpha, int beta, int ply, int depth) { - bb.putInt ( 0, (int)-1); + bb.putInt ( 0, -1); bb.putInt ( 4, (int)parentIndex); bb.putShort( 8, (short)(m.from + (m.to << 6) + (m.promoteTo << 12))); bb.putShort(10, (short)alpha);