def turn_if_reach_wall
      lr = reach_left_or_right_wall?
      tb = reach_top_or_bottom_wall?
      if lr && tb
        turn
      elsif lr
        turn_x
      elsif tb
        turn_y
      end
    end
def turn_if_reach_wall
      lr = reach_left_or_right_wall?
      tb = reach_top_or_bottom_wall?
      if lr && tb
        turn
      elsif lr
        turn_x
      elsif tb
        turn_y
      end
    end
もし端に着いたら、跳ね返る