<commit_before># DUEL variables
DUEL_DICE = 4
MAX_HP = 6

# write the action on screen
def action(roll):
    if roll == 4:
        return "blocks"
    elif roll == 3:
        return "dodges"
    elif roll == 2:
        return "swings low"
    else:
        return "swings high"

# Duel between two fighters
def duel(fighter1,fighter2):
    hp1 = MAX_HP
    hp2 = MAX_HP
    
    res = fighter1 + " and " + fighter2 + " start a duel! ("+str(MAX_HP)+"-"+str(MAX_HP)+")"
    print(res)
    while(hp1 > 0 and hp2 > 0):
        roll1 = randint(1,DUEL_DICE)
        roll2 = randint(1,DUEL_DICE)
        
        
        if roll1 == 4:
            if roll2 == 4:
                hp1 -= 0
                hp2 -= 0
            elif roll2 == 3:
                hp1 -= 0
                hp2 -= 0           
            elif roll2 == 2:
                hp1 -= 0.5
                hp2 -= 0
            else:
                hp1 -= 1
                hp2 -= 0          
        elif roll1 == 3:
            if roll2 == 4:
                hp1 -= 0
                hp2 -= 0               
            elif roll2 == 3:
                hp1 -= 0
                hp2 -= 0                
            elif roll2 == 2:
                hp1 -= 0<commit_msg>FINAL COMMIT FINALLY FFS<commit_after>from random import randint

# DUEL variables
DUEL_DICE = 4
MAX_HP = 6

# write the action on screen
def action(roll):
    if roll == 4:
        return "blocks"
    elif roll == 3:
        return "dodges"
    elif roll == 2:
        return "swings low"
    else:
        return "swings high"

# Duel between two fighters
def duel(fighter1,fighter2):
    hp1 = MAX_HP
    hp2 = MAX_HP
    
    while(hp1 > 0 and hp2 > 0):
        roll1 = randint(1,DUEL_DICE)
        roll2 = randint(1,DUEL_DICE)
        
        
        if roll1 == 4:
            if roll2 == 4:
                hp1 -= 0
                hp2 -= 0
            elif roll2 == 3:
                hp1 -= 0
                hp2 -= 0           
            elif roll2 == 2:
                hp1 -= 0.5
                hp2 -= 0
            else:
                hp1 -= 1
                hp2 -= 0          
        elif roll1 == 3:
            if roll2 == 4:
                hp1 -= 0
                hp2 -= 0               
            elif roll2 == 3:
                hp1 -= 0
                hp2 -= 0                
            elif roll2 == 2:
                hp1 -= 0
{'fraction_non_alphanumeric': 0.09428452231956612, 'fraction_numerical': 0.05089695452649145, 'mean_word_length': 0.9062003179650239, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2412260', 'n_tokens_mistral': 856, 'n_tokens_neox': 732, 'n_words': 222}