def tick(self): from board_object import BoardObject for board_obj in BoardObject.get_all(): if board_obj.curr_path: next_hex = board_obj.curr_path[0] board_obj.curr_path = board_obj.curr_path[1:] board_obj.move_to_hex(next_hex)
def mouse_right_click(self, x, y): curr_ctrl = Controller.get_controller() curr_hex = curr_ctrl.get_clicked_hex(x, y) if curr_hex and curr_hex.is_pathable(): from board_object import BoardObject for board_obj in BoardObject.get_all(): if board_obj.is_selected(): board_obj.set_destination(curr_hex)
def mouse_left_click(self, x, y): curr_ctrl = Controller.get_controller() curr_hex = curr_ctrl.get_clicked_hex(x, y) if curr_hex and curr_hex.get_board_object(): curr_board_obj = curr_hex.get_board_object() if curr_board_obj: from board_object import BoardObject for board_obj in BoardObject.get_all(): board_obj.set_selected(False) curr_board_obj.set_selected(True)