Mistři v programování na #hovnokod

Python #353

def find_where_ball_collides_on_a_wall(
                                       ball_w, ball_z,
                                       ball_wol, ball_zol,
                                       ball_rad,
                                       wall_type,
                                       wall_w1, wall_z1,
                                       wall_w2, wall_z2,
                                       wall_rad):
    toetoadly = ball_rad + wall_rad
    did_collide = False
    New_ball_w = ball_w + ball_wol
    New_ball_z = ball_z + ball_zol
    angle_hit_at = None
    Relate_ball_w = ball_w - wall_w1
    Relate_ball_z = ball_z - wall_z1
    Relate_wall_w2 = wall_w2 - wall_w1
    Relate_wall_z2 = wall_z2 - wall_z1
    arc_tangeriney = arc_tangent_2D(Relate_wall_w2, Relate_wall_z2)
    Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_Relate_wall_w2, Rotate_Relate_wall_z2 = points_rotated_by_angle_2D(((Relate_ball_w, Relate_ball_z), (Relate_wall_w2, Relate_wall_z2)), 0, 0, arc_tangeriney)
    Rotate_ball_wol, Rotate_ball_zol = point_rotated_by_angle_2D(ball_wol, ball_zol, 0, 0, arc_tangeriney)
    Rotate_Relate_ball_collide_w, Rotate_Relate_ball_collide_z, did_hit_weird_line = Find_where_ball_stops_on_line_w(Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_ball_wol, Rotate_ball_zol, ball_rad, 0, wall_rad)
    if Rotate_Relate_ball_w > -toetoadly and Rotate_Relate_ball_w < toetoadly:
     HE_HE_strange_popper_z = Rotate_Relate_ball_z
    else:
     HE_HE_strange_popper_z = Rotate_Relate_ball_collide_z
    Rotate_angle_hit_at = None
    if   HE_HE_strange_popper_z < Rotate_Relate_wall_z2:
       if ball_is_going_towards_point(Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_ball_wol, Rotate_ball_zol, 0, Rotate_Relate_wall_z2):
        p1_touched, p1_collide_w, p1_collide_z, p1_angle_hit_at = find_where_ball_collides_on_another_ball(Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_ball_wol, Rotate_ball_zol, ball_rad, 0, Rotate_Relate_wall_z2, wall_rad)
        if p1_touched:
         Rotate_Relate_ball_collide_w = p1_collide_w
         Rotate_Relate_ball_collide_z = p1_collide_z
         Rotate_angle_hit_at = p1_angle_hit_at
         did_collide = True
    elif HE_HE_strange_popper_z > 0:
       if ball_is_going_towards_point(Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_ball_wol, Rotate_ball_zol, 0, 0):
        p2_touched, p2_collide_w, p2_collide_z, p2_angle_hit_at = find_where_ball_collides_on_another_ball(Rotate_Relate_ball_w, Rotate_Relate_ball_z, Rotate_ball_wol, Rotate_ball_zol, ball_rad, 0, 0, wall_rad)
        if p2_touched:
         Rotate_Relate_ball_collide_w = p2_collide_w
         Rotate_Relate_ball_collide_z = p2_collide_z
         Rotate_angle_hit_at = p2_angle_hit_at
         did_collide = True
    else:
       if did_hit_weird_line:
        did_collide = True
        if Rotate_Relate_ball_collide_w < 0: Rotate_angle_hit_at = 90
        else: Rotate_angle_hit_at = 270
    if did_collide:
     arc_tangeriney_2 = -arc_tangeriney
     angle_hit_at = Rotate_angle_hit_at + arc_tangeriney
     New_ball_w, New_ball_z = point_rotated_by_angle_2D(Rotate_Relate_ball_collide_w, Rotate_Relate_ball_collide_z, 0, 0, arc_tangeriney_2)
     New_ball_w += wall_w1
     New_ball_z += wall_z1
    return did_collide, New_ball_w, New_ball_z, angle_hit_at  #, is_moving_towards

HovnoKod,