Esempio n. 1
0
        public override void Load(string path)
        {
            BinaryFormatter format = new BinaryFormatter();
            BlackjackGame   state  = (BlackjackGame)format.Deserialize(File.Open(path, FileMode.Open));

            deck       = state.deck;
            houseCards = state.houseCards;
            players    = state.players;
            currPlayer = state.currPlayer;
            roundOver  = state.roundOver;
        }
Esempio n. 2
0
        public void Initialize()
        {
            game = new BlackjackGame();
            game.InitializePlayers(playerAmo, playerNames, null);
            game.Start();

            // Display Cards
            // Buttons
            // Hit Btn

            // Center Card / Deck
            {
                Card c = new Card(1, 0);
                c.IsFlipped = true;
                var image = CardImageCreator.VisualizeCard(c, centerPanel);
                Grid.SetColumn(image, 0);
                Grid.SetRow(image, 0);
                Grid.SetColumnSpan(image, 2);
                Grid.SetRowSpan(image, 2);
            }

            HideBlackJack();
            SetupAnte();
        }