Loosen GDB utils constructors

This commit is contained in:
Bruno BELANYI 2024-04-03 23:39:37 +01:00
parent cb06fc10c8
commit b289927e3a

View file

@ -13,6 +13,8 @@ class Square(object):
RANKS = list(map(lambda n: str(n + 1), range(8)))
def __init__(self, val):
if isinstance(val, Square):
val = val._val
self._val = val
@classmethod
@ -37,6 +39,8 @@ class Bitboard(object):
"""
def __init__(self, val):
if isinstance(val, Bitboard):
val = val._val
self._val = val
def __str__(self):