def draft_step(packs,decks,num_picked,player_pick): if player_pick in packs[0]: packs[0].remove(player_pick) decks[0].append(player_pick) for i in range(1,8): ai_pick = ai_pick_fun(packs[i],decks[i]) packs[i].remove(ai_pick) decks[i].append(ai_pick) num_picked += 1 if num_picked == 15 or num_picked == 30: for i in range(8): packs[i] = m12data.random_pack() else: if num_picked < 15 or num_picked > 30: # rotate left packs = packs[1:] + [packs[0]] else: # rotate right packs = [packs[-1]] + packs[:-1] return packs, decks, num_picked
def new_sealed(): cards = [] for i in range(6): cards.extend(m12data.random_pack()) return cards
def new_draft(): return [m12data.random_pack() for i in range(8)], [[] for i in range(8)], 0