def decide_cards_to_play(value,game_state,bluff_thresh,data,lie): print("hand on local: "+str(game_state._bot._hand)) bot=game_state._bot value=bot.get_number_val(value) cards_to_play=[] bluff_calc=bluff.BluffCalculator() cards=bluff_calc.should_bluff(game_state,value,bluff_thresh) if cards!=0: lie.append(0) cards_to_play=cards data.append(game_state._num_cards_center) data.append(game_state._num_played_cards) for card in bot._hand: if card['Value']==value: cards_to_play.append(card) bot._hand.remove(card) if len(cards) != 0: num_r = 0 for c in cards: if c['Value'] == value: num_r += 1 data.append(bluff_calc.prob_calculator(value,game_state,5-num_r)) for i in cards_to_play: game_state._known_center_cards.append(i) game_state._num_cards_center+=len(cards_to_play) bot._cards_played_into_center+=len(cards_to_play) print("cards played: "+str(cards_to_play)) return cards_to_play
def decide_cards_to_play(value,game_state,bluff_thresh): print("hand on local: "+str(game_state._bot._hand)) bot=game_state._bot value=bot.get_number_val(value) cards_to_play=[] bluff_calc=bluff.BluffCalculator() cards=bluff_calc.should_bluff(game_state,value,bluff_thresh) if cards!=0: cards_to_play=cards for card in bot._hand: if card['Value']==value: cards_to_play.append(card) bot._cards_played_into_center+=len(cards_to_play) game_state._num_cards_center+=len(cards_to_play) for card in cards_to_play: game_state._known_center_cards.append(card) print("cards played: "+str(cards_to_play)) return cards_to_play