def set_piece_at(self, square, piece): ''' In `BaseBoard`, this method expects a square and a Piece object. But for BlindBoards, we only need the second argument to be a color (we don't need the piece type). ''' if piece in chess.COLORS: piece = Piece(PAWN, piece) elif not isinstance(piece, Piece): raise ValueError("`%s` is neither a `bool` nor a Piece object" % str(piece)) return BaseBoard.set_piece_at(self, square, piece)