Exemple #1
0
        private void InitializeObject()
        {
            Pot           = 0;
            MinBet        = 50;
            StartCash     = 10000;
            _players      = new List <PlayerBaseViewModel>();
            _cardsOnTable = new List <Card>();

            FirstPlayer = new PlayerViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = true, Name = "Игрок", IsSmallBlind = false, IsBigBlind = false, Number = 0
                },
                TableInfo = this
            };

            SecondPlayer = new AIViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = false, Name = "Компьютер 1", IsSmallBlind = true, IsBigBlind = false, Number = 1
                },
                TableInfo = this
            };
            ThirdPlayer = new AIViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = false, Name = "Компьютер 2", IsSmallBlind = false, IsBigBlind = true, Number = 2
                },
                TableInfo = this
            };
            FourthPlayer = new AIViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = false, Name = "Компьютер 3", IsSmallBlind = false, IsBigBlind = false, Number = 3
                },
                TableInfo = this
            };
            FifthPlayer = new AIViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = false, Name = "Компьютер 4", IsSmallBlind = false, IsBigBlind = false, Number = 4
                },
                TableInfo = this
            };
            SixthPlayer = new AIViewModel()
            {
                PlayerState = new PlayerState()
                {
                    Cash = StartCash, IsDealer = false, Name = "Компьютер 5", IsSmallBlind = false, IsBigBlind = false, Number = 5
                },
                TableInfo = this
            };
            _deck = new CardDeck();

            _players.Add(FirstPlayer);
            _players.Add(SecondPlayer);
            _players.Add(ThirdPlayer);
            _players.Add(FourthPlayer);
            _players.Add(FifthPlayer);
            _players.Add(SixthPlayer);
        }