Minor fixups. Require nim 2.0.4 or higher to build

This commit is contained in:
Mattia Giambirtone 2024-04-23 20:17:07 +02:00
parent 23d7a0427f
commit 584a29618a
4 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ bin = @["nimfish"]
# Dependencies
requires "nim >= 2.0"
requires "nim >= 2.0.4"
requires "jsony >= 1.1.5"

View File

@ -235,10 +235,10 @@ proc attemptMagicTableCreation(kind: PieceKind, square: Square, entry: MagicEntr
## at the given square using the provided magic entry. Returns
## (true, table) if successful, (false, empty) otherwise
# Initialize a new sequence with capacity 2^indexBits
result.table = newSeqOfCap[Bitboard](1 shl (64'u8 - entry.shift))
# Initialize a new sequence with the right capacity
result.table = newSeqOfCap[Bitboard](1 shl (64'u8 - entry.shift)) # Just a fast way of doing 2 ** n
result.success = true
for _ in 0..result.table.capacity:
for _ in 0..<result.table.capacity:
result.table.add(Bitboard(0))
# Iterate all possible blocker configurations
for blocker in entry.mask.subsets():

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long