def pick_action_todo():
    """
    only for testing and AI - user will usually choose an action
    Sort of works
    """
    for ndx, todo in enumerate(things_to_do):
        #print('todo = ', todo)
        if roll_dice(todo["chance"]):
            cur_act = actions[get_action_by_name(todo["name"])]
            if todo["WHERE_COL"] == "energy" and my_char["energy"] > todo["WHERE_VAL"]:
                return cur_act
            if todo["WHERE_COL"] == "gold" and my_char["gold"] > todo["WHERE_VAL"]:
                return cur_act


    return actions[3]
def pick_action_todo ( ) : for ndx , todo in enumerate ( things_to_do ) : if roll_dice ( todo [ "chance" ] ) : cur_act = actions [ get_action_by_name ( todo [ "name" ] ) ] if todo [ "WHERE_COL" ] == "energy" and my_char [ "energy" ] > todo [ "WHERE_VAL" ] : return cur_act if todo [ "WHERE_COL" ] == "gold" and my_char [ "gold" ] > todo [ "WHERE_VAL" ] : return cur_act return actions [ 3 ]
only for testing and AI - user will usually choose an action
    Sort of works