Fix fen loading tests
This commit is contained in:
@@ -92,6 +92,14 @@ def sq(name):
|
||||
return f + 8 * r
|
||||
|
||||
|
||||
def popcount(x):
|
||||
return x.bit_count()
|
||||
|
||||
|
||||
def get_rank_mask(rank):
|
||||
return sum(1 << (rank*8 + f) for f in range(8))
|
||||
|
||||
|
||||
class ChessFFI:
|
||||
def __init__(self):
|
||||
self.lib_path = "./build/libchess.so"
|
||||
@@ -130,10 +138,6 @@ class ChessFFI:
|
||||
|
||||
def attackers_to(self, board, sq, by):
|
||||
return self._c_attackers_to(board, sq, by)
|
||||
|
||||
|
||||
def popcount(self, x):
|
||||
return x.bit_count()
|
||||
|
||||
|
||||
def _load_lib(self):
|
||||
|
||||
Reference in New Issue
Block a user