Exemplo n.º 1
0
        static void Main(string[] args)
        {
            List<Game> gameWonByOp = new List<Game>();

            int winFriend = 0;
            int winOp = 0;

            //Parallel.For(0,100, i =>
            //for (int i = 0; i < 10000; i++)
            {
                game = new Game();
                game.Init();

                while (!game.IsFinished)
                {
                    game.NextTurn();
                    game.PrintScore();
                }

                if (game.friendPlayer.Score > game.oppositePlayer.Score)
                    winFriend++;
                else if (game.friendPlayer.Score < game.oppositePlayer.Score)
                {
                    winOp++;
                    gameWonByOp.Add(game);
                }
            };
        }
Exemplo n.º 2
0
 public Player(Game game, PlayerType playerType)
 {
     ListCard = new List<Card>();
     ListIndexPickedCard = new List<int>();
     ListIndexAvailableCard = new List<int>();
     Score = 0;
     FreePawns = 17;
     PlayerType = playerType;
     Game = game;
 }