

def hit_listener(self, region, tags, shot, shot_list_item):
    if ('subtarget' in tags):
        if (tags['subtarget'].startswith('left_plate') or tags['subtarget'].startswith('right_plate')):
            if (tags['subtarget'] in self._targets_on_left):
                self._targets_on_left.remove(tags['subtarget'])
                self._targets_on_right.append(tags['subtarget'])
                hit_by = 'left'
            elif (tags['subtarget'] in self._targets_on_right):
                self._targets_on_left.append(tags['subtarget'])
                self._targets_on_right.remove(tags['subtarget'])
                hit_by = 'right'
            self._operations.append_shot_item_values(shot_list_item, (hit_by,))
        if (len(self._targets_on_right) == 6):
            self._left_score += 1
            self._round_over()
        if (len(self._targets_on_left) == 6):
            self._right_score += 1
            self._round_over()

dataset/ETHPy150Open phrack/ShootOFF-legacy/training_protocols/dueling_tree/__init__.py DuelingTree.hit_listener/original