src/pieces.py
def is_check(self, pieces: List[Any], sx: int = -1, sy: int = -1) -> bool:
        """Return true if in check otherwise false"""
        if sx == -1 and sy == -1:
            sx, sy = self.get_square()
        return any(
            p.color != self.color and p.can_move(sx, sy, pieces) for p in pieces
        )
Return true if in check otherwise false
Return true if in check otherwise false
Return true if in check otherwise false
def is_check(self, pieces: List[Any], sx: int = -1, sy: int = -1) -> bool:
        if sx == -1 and sy == -1:
            sx, sy = self.get_square()
        return any(
            p.color != self.color and p.can_move(sx, sy, pieces) for p in pieces
        )
def is_check ( self , pieces : List [ Any ] , sx : int = - 1 , sy : int = - 1 ) -> bool : if sx == - 1 and sy == - 1 : sx , sy = self . get_square ( ) return any ( p . color != self . color and p . can_move ( sx , sy , pieces ) for p in pieces )
Return true if in check otherwise false
Return true if in check otherwise false
"""Return true if in check otherwise false"""
self
pieces
List[Any]
sx
int
sy
int