Skip to content

Commit

Permalink
Additional checks in rust_to_python translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper-Guo committed Jul 2, 2024
1 parent e574a7d commit de4d921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def rust_to_python(rust_seed: int, verify: bool = True) -> int:
10: black win
11: in progress
"""
if verify:
assert (rust_seed & (0xFFFF << 8)) >> 8 == (
rust_seed & (0xFFFF << 36)
) >> 36, f"{rust_seed}"

py_seed = 0
white_total, black_total = 0, 0

Expand Down

0 comments on commit de4d921

Please sign in to comment.