示例#1
0
 public SaveResults(int bet, List <Bot> bots, GameeTypes gameType, List <Card> prikup, List <Card> sbros, List <KeyValuePair <Bot, Card> > table, List <Card> threws, Suits trump, List <string> winners, Score score)
 {
     this.bet      = bet;
     this.bots     = bots;
     this.gameType = gameType;
     this.prikup   = prikup;
     this.sbros    = sbros;
     this.table    = table; this.threws = threws;
     this.trump    = trump; this.winners = winners;
     this.score    = score;
 }
示例#2
0
文件: Round.cs 项目: gesnon/Preferans
        private void PrepareGame()
        {
            if (currentBet >= 4)
            {
                foreach (var f in bots)
                {
                    f.ShowHand();
                }
                currentGameType = GameeTypes.NaVzyatki;
                Console.WriteLine("тип текущей игры -" + currentGameType);
                foreach (var q in bots)
                {
                    if (q.strategue != enums.Strategues.GAME)
                    {
                        q.strategue = Strategues.PASS;
                    }
                }
                Console.WriteLine("козырь - " + currentTrump);
                Console.WriteLine("заявка -" + currentBet);
                Console.WriteLine();
                bots.First(q => q.strategue == Strategues.GAME).changeHand(currenPrukup, currentSbros);
                foreach (var bot in bots)
                {
                    if (bot.strategue != Strategues.GAME && bot.expectVzyatki > 0)
                    {
                        bot.GameStrategue = Strategues.VIST;
                    }
                    if (bot.strategue == Strategues.GAME)
                    {
                        bot.GameStrategue = Strategues.GAME;
                    }
                }
                Console.WriteLine("стратегия на торге");
                foreach (var bot1 in bots)
                {
                    if (bot1.strategue == enums.Strategues.GAME)
                    {
                        Console.WriteLine(bot1.name + " " + bot1.strategue + " " + currentBet + " " + currentTrump);
                    }
                    if (bot1.strategue != enums.Strategues.GAME)
                    {
                        Console.WriteLine(bot1.name + " " + bot1.strategue);
                    }
                }
                Console.WriteLine("стратегия на игру");
                foreach (var bot2 in bots)
                {
                    Console.WriteLine(bot2.name + " " + bot2.GameStrategue);
                }
            }
            if (currentBet <= 3 && currentBet > 0)
            {
                currentGameType = GameeTypes.Raspas;
                Console.WriteLine("тип текущей игры -" + currentGameType);
                foreach (var bot1 in bots)
                {
                    bot1.strategue = Strategues.PASS; bot1.GameStrategue = enums.Strategues.GAME;
                }
                currentTrump = currenPrukup[0].suit;
                Console.WriteLine("козырь - " + currentTrump);

                Console.WriteLine("стратегия на торге");
                foreach (var bot1 in bots)
                {
                    Console.WriteLine(bot1.name + " " + bot1.strategue);
                }
                Console.WriteLine("стратегия на игру");
                foreach (var bot2 in bots)
                {
                    Console.WriteLine(bot2.name + " " + bot2.GameStrategue);
                }
            }
            if (currentBet == 0)
            {
                currentGameType = GameeTypes.Mizer;
                Console.WriteLine("тип текущей игры -" + currentGameType);
                currentTrump = null;
            }
        }