Add 'Bitboard.at' in GDB utils

This commit is contained in:
Bruno BELANYI 2024-04-01 14:38:26 +01:00
parent a1005c1bec
commit dcd76c5bef

View file

@ -41,6 +41,9 @@ class Bitboard(object):
def __str__(self):
return "[" + ", ".join(map(str, self.squares)) + "]"
def at(self, square):
return bool(self._val & (1 << square._val))
@property
def squares(self):
n = self._val