Пример #1
0
        private static void Main()
        {
            IPlayer southPlayer = new AnnabelleBransfordAI("South dummy");
            IPlayer eastPlayer = new DummyPlayer("East dummy");
            IPlayer northPlayer = new AnnabelleBransfordAI("North dummy");
            IPlayer westPlayer = new DummyPlayer("West dummy");
            var game = new GameManager(southPlayer, eastPlayer, northPlayer, westPlayer);
            game.GameInfo.PlayerBid += GameInfoOnPlayerBid;
            game.GameInfo.CardPlayed += GameInfoOnCardPlayed;

            int testSouthNorth = 0;
            int testEastWest = 0;
            for (int j = 0; j < 25; j++)
            {
                testSouthNorth = 0;
                testEastWest = 0;
                for (int i = 0; i < 5000; i++)
                {
                    game.StartNewGame();
                    if (game.SouthNorthScore > game.EastWestScore)
                    {
                        testSouthNorth++;
                    }
                    else
                    {
                        testEastWest++;
                    }
                    //Console.WriteLine("{0} - {1}", game.SouthNorthScore, game.EastWestScore);
                }
                Console.WriteLine("Games won SN: {0} - Games won EW: {1}", testSouthNorth, testEastWest );
            }
        }
Пример #2
0
        public static void Main()
        {
            Console.WriteLine("JustBelot 1.0.20130220");
            Console.Write("Please enter player name: ");
            var playerName = Console.ReadLine();

            IPlayer southPlayer = new ConsoleHumanPlayer(playerName);
            IPlayer eastPlayer = new DummyPlayer();
            IPlayer northPlayer = new DummyPlayer();
            IPlayer westPlayer = new DummyPlayer();

            var game = new GameManager(southPlayer, eastPlayer, northPlayer, westPlayer);
            game.StartNewGame();
        }
Пример #3
0
        private static void Main()
        {
            IPlayer southPlayer = new DummyPlayer("South dummy"); // new DebugDummyPlayer("South debug dummy");
            IPlayer eastPlayer = new DummyPlayer("East dummy");
            IPlayer northPlayer = new DummyPlayer("North dummy", alwaysPass: false);
            IPlayer westPlayer = new DummyPlayer("West dummy", alwaysPass: false);
            var game = new GameManager(southPlayer, eastPlayer, northPlayer, westPlayer);
            game.GameInfo.PlayerBid += GameInfoOnPlayerBid;
            game.GameInfo.CardPlayed += GameInfoOnCardPlayed;

            for (int i = 0; i < 10000; i++)
            {
                game.StartNewGame();
                //// Console.WriteLine("{0} - {1}", game.SouthNorthScore, game.EastWestScore);
            }
        }
Пример #4
0
        public static void Main()
        {
            // Initialize console properties
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            ConsoleHelper.ResizeConsole(80, 20);
            Console.OutputEncoding = Encoding.Unicode;

            ConsoleHelper.DrawTextBoxTopLeft(Settings.ProgramName, 0, 0, ConsoleColor.Black, ConsoleColor.DarkGray);
            ConsoleHelper.WriteOnPosition("Please enter player name: ", 20, 9, ConsoleColor.Black, ConsoleColor.DarkGray);
            var playerName = Console.ReadLine();
            Console.Clear();

            IPlayer southPlayer = new ConsoleHumanPlayer(playerName);
            IPlayer eastPlayer = new DummyPlayer("East dummy");
            IPlayer northPlayer = new DummyPlayer("North dummy");
            IPlayer westPlayer = new DummyPlayer("West dummy");

            var game = new GameManager(southPlayer, eastPlayer, northPlayer, westPlayer);
            game.StartNewGame();
        }