public override bool TakeInsurance(Game game)
{
int[] shoe = game.Shoe.Counts;
shoe[game.DealerHand[1].PointValue - 1]++;
double insurance_ev = Eval.InsuranceEv(max_bet, shoe);
if (insurance_ev >= 0.0)
return true;
else
return false;
/*
// remember the unseen dealt second dealer card, which is still reduced from shoe!
// take into account
int seen_tens = card_counts[9];
if (game.PlayerHandSet.ActiveHand[0].IsTenValue())
seen_tens++;
if (game.PlayerHandSet.ActiveHand[1].IsTenValue())
seen_tens++;
// add the dealer's second dealt card to unknown count (+1)
double bj_prob = (double)(8*4*4-seen_tens) / (double)(game.Shoe.Count + 1);
double insurance_ev = 1.0*bj_prob-0.5*(1.0-bj_prob);
// we take insurance
if (insurance_ev >= 0.0)
return true;
else
return false;*/
}