<commit_before>import standard_play
import behavior
import skills
import tactics
import robocup
import constants
import main
import enum


class OurCornerKick(standard_play.StandardPlay):

    MinChipRange = 0.3
    MaxChipRange = 3.0
    ChipperPower = 0.5
    TargetSegmentWidth = 1.5
    MaxKickSpeed = 0.5
    MaxKickAccel = 0.5

    class State(enum.Enum):
        move = 1

        kick = 2

    def __init__(self):
        super().__init__(continuous=True)

        for s in OurCornerKick.State :
            self.add_state(s, behavior.Behavior.State.running)

        self.add_transition(behavior.Behavior.State.start,
                            OurCornerKick.State.move, lambda: True,
                            'immediately')

        self.add_transition(OurCornerKick.State.move,
                            OurCornerKick.State.kick,
                            lambda: self.subbehavior_with_name('move behind').state == behavior.Behavior.State.completed,
                            'kick')

        self.kicker = skills.line_kick.LineKick()
        self.add_transition(OurCornerKick.State.kick,
                            behavior.Behavior.State.completed,
                            self.kicker.is_done_running, 'kicker is done')

    @classmethod
    def score(cls):
        gs = main.game_state()
        if gs.is_ready_state() and gs.is_our_direct() and main.ball().pos.y > (
                constants.Field.Length - 1.0):
            return 1
        else:
            return float("inf")

    @classmethod
    def is_restart(cls):
        return True

    def on_enter_move(self):
        goal_x = constants.Field.GoalWidth * (1 if main.ball().pos.x < 0 else -1)
        self.move_behind_pos = (main.ball().pos - robocup.Segment(
            robocup.Point(goal_x, constants.Field.Length), robocup.Point(
                goal_x,<commit_msg>fixed corner kick and also fixed back indirect kicks on free kick<commit_after>import standard_play
import behavior
import skills
import tactics
import robocup
import constants
import main
import enum


class OurCornerKick(standard_play.StandardPlay):

    MinChipRange = 0.3
    MaxChipRange = 3.0
    ChipperPower = 0.5
    TargetSegmentWidth = 1.5
    MaxKickSpeed = 0.5
    MaxKickAccel = 0.5

    class State(enum.Enum):
        move = 1

        kick = 2

    def __init__(self):
        super().__init__(continuous=True)

        for s in OurCornerKick.State :
            self.add_state(s, behavior.Behavior.State.running)

        self.add_transition(behavior.Behavior.State.start,
                            OurCornerKick.State.move, lambda: True,
                            'immediately')

        self.add_transition(OurCornerKick.State.move,
                            OurCornerKick.State.kick,
                            lambda: True,#self.subbehavior_with_name('move behind').state == behavior.Behavior.State.completed,
                            'kick')

        self.kicker = skills.line_kick.LineKick()
        self.add_transition(OurCornerKick.State.kick,
                            behavior.Behavior.State.completed,
                            self.kicker.is_done_running, 'kicker is done')

    @classmethod
    def score(cls):
        gs = main.game_state()
        if gs.is_ready_state() and gs.is_our_direct() and main.ball().pos.y > (
                constants.Field.Length - 1.0):
            return 1
        else:
            return float("inf")

    @classmethod
    def is_restart(cls):
        return True

    def on_enter_move(self):
        goal_x = constants.Field.GoalWidth * (1 if main.ball().pos.x < 0 else -1)
        self.move_behind_pos = (main.ball().pos - robocup.Segment(
            robocup.Point(goal_x, constants.Field.Length), robocup.Point(
                goal_x,
{'fraction_non_alphanumeric': 0.09254362771020624, 'fraction_numerical': 0.010576414595452142, 'mean_word_length': 1.9144838212634823, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2134638', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1097, 'n_words': 220}