private void SimulateHand(IBlackjack game, int playerDraws) { for (int draws = 0; draws < playerDraws && !game.HandOver; draws++) { game.Hit(); } game.Stand(); }
public void Play(IBlackjack game) { if (game.ActiveHand.Value < hitBelow) { game.Hit(); } else { game.Stand(); } }
public void Play(IBlackjack game) { double winZero = Simulate(game, 0); double winDraw = 0; for (int currentDraw = 1; currentDraw <= maxDraw; currentDraw++) { winDraw += Simulate(game, currentDraw); if (currentDraw == 1 && winDraw > doubleDown) { game.DoubleDown(); return; } if (winDraw > winZero) { game.Hit(); return; } } game.Stand(); }