A collection of various settings for a game of Blackjack.
예제 #1
0
파일: Program.cs 프로젝트: tansey/blackjack
        private static BlackjackSettings SaveDefaultSettings()
        {
            BlackjackSettings settings = new BlackjackSettings()
            {
                DecksPerShoe = 8,
                MinCardsDealtBeforeReshuffle = 230,

                MinimumBet = 5,
                MaximumBet = 200,

                DealerHardStandThreshold = 17,
                DealerSoftStandThreshold = 18,

                BlackjackPayoff = 2.5m,

                InsuranceOffered = true,
                InsuranceCost = 1m,
                InsurancePayoff = 2m,

                ResplitAcesAllowed = true,
                SplitTensAllowed = true,

                HittingSplitAcesAllowed = true,

                DoubleDownOnlyTenOrEleven = false,
                SoftDoubleDownAllowed = true,
                DoubleDownNonAceSplitsAllowed = true,
                DoubleDownSplitAcesAllowed = false,

                SurrenderAllowed = true,
                SurrenderPayoff = 0.5m
            };
            XmlSerializer ser = new XmlSerializer(typeof(BlackjackSettings));
            using (TextWriter writer = new StreamWriter("settings.xml"))
                ser.Serialize(writer, settings);
            return settings;
        }
예제 #2
0
 public BlackjackGame(BlackjackSettings settings)
 {
     Settings = settings;
     _shoe    = new Shoe(settings.DecksPerShoe);
 }
예제 #3
0
 public BlackjackGame(BlackjackSettings settings)
 {
     Settings = settings;
     _shoe = new Shoe(settings.DecksPerShoe);
 }