From dcd76c5befc6f372d96f5ccae82e95e3b1324013 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 1 Apr 2024 14:38:26 +0100 Subject: [PATCH] Add 'Bitboard.at' in GDB utils --- utils/gdb/seer_pretty_printers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/gdb/seer_pretty_printers.py b/utils/gdb/seer_pretty_printers.py index c80f6a7..56336d6 100644 --- a/utils/gdb/seer_pretty_printers.py +++ b/utils/gdb/seer_pretty_printers.py @@ -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