Skip to content

Commit

Permalink
throw away lsb rather than msb of hashes
Browse files Browse the repository at this point in the history
for compatibility with lichess-org/compression

fix #16317
  • Loading branch information
schlawg authored Nov 5, 2024
1 parent 6bf25de commit bd9bc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/Hash.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ opaque type Hash = Int
object Hash:
val size = 3
def apply(value: Int): Hash = value & 0x00ff_ffff
def apply(situation: Situation): Hash = hashSituation(situation) & 0x00ff_ffff
def apply(situation: Situation): Hash = hashSituation(situation) >>> 8

private def hashSituation(situation: Situation): Int =
import situation.board
Expand Down

0 comments on commit bd9bc13

Please sign in to comment.