popravil but, ki je nastal zaradi cum_weights, namesto weights...

master
Jan Kostanjevec 2022-05-02 00:55:15 +02:00
parent 50518a326e
commit 7a0109916e
1 changed files with 3 additions and 2 deletions

View File

@ -76,9 +76,9 @@ def generate_deck_prob(user_clltn, max_new, max_due):
print("weigts new: ", w_new, "due: ", w_due) print("weigts new: ", w_new, "due: ", w_due)
if due_cards: if due_cards:
dck_due = choices(user_clltn, cum_weights=w_due, k=max_due) dck_due = choices(user_clltn, weights=w_due, k=max_due) #ni garancije, da ni ponovitev
if new_cards: if new_cards:
dck_new = choices(user_clltn, cum_weights=w_new, k=max_new) dck_new = choices(user_clltn, weights=w_new, k=max_new)
deck = dck_due + dck_new deck = dck_due + dck_new
@ -103,6 +103,7 @@ def prob_eval_card(card):
def prob_eval_deck(deck, user_clltn): def prob_eval_deck(deck, user_clltn):
for c in deck: for c in deck:
print("deck: ", deck)
id, _, _, _, _, _ = c id, _, _, _, _, _ = c
# tu dobimo karico, kjer se je nekaj spremenilo # tu dobimo karico, kjer se je nekaj spremenilo
card_mod = prob_eval_card(c) card_mod = prob_eval_card(c)