Add 'Bitboard.at' in GDB utils
This commit is contained in:
parent
a1005c1bec
commit
dcd76c5bef
|
@ -41,6 +41,9 @@ class Bitboard(object):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "[" + ", ".join(map(str, self.squares)) + "]"
|
return "[" + ", ".join(map(str, self.squares)) + "]"
|
||||||
|
|
||||||
|
def at(self, square):
|
||||||
|
return bool(self._val & (1 << square._val))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def squares(self):
|
def squares(self):
|
||||||
n = self._val
|
n = self._val
|
||||||
|
|
Loading…
Reference in a new issue