extends "res://Piece.gd" func setup(): kind = KIND.BISHOP var sprite2d = get_node("Sprite2D") if team == TEAM.WHITE: sprite2d.region_rect = Rect2(95, 4, 35, 36) elif team == TEAM.BLACK: sprite2d.region_rect = Rect2(95, 49, 35, 36) func check_move(destination: Vector2i) -> bool: var board_state = get_board_state() if board_state.has(destination): if board_state[destination].team == team: return false if !path_empty(destination): return false var dx = abs(destination.x - grid_pos.x) var dy = abs(destination.y - grid_pos.y) return dx == dy and dx > 0