import yaml
import random
def ChangeWord(result): #выбирает рандомное слово для изменения размера пиписы
with open("dicktxt/dick_changes.yaml", 'r') as f:
words = yaml.load(f, Loader=yaml.Loader)
dick_inc = ( f'{w}' for w in words['increment'] )
dick_static = ( f'{w}' for w in words['nothing'] )
dick_decr = ( f'{w}' for w in words['decrement'] )
if result > 0:
size_change = random.choice(dick_inc) + '🚀'
elif result == 0:
size_change = random.choice(dick_static) + '🤨'
else:
size_change = random.choice(dick_decr) + '✂'
return size_change