コード例 #1
0
ファイル: Program.cs プロジェクト: kkawaguchi/osero
        static void Main(string[] args)
        {
            //ゲームを作成
            Game    game    = new Game();
            IPlayer player1 = new AIPlayer2(StoneColor.Black);
            IPlayer player2 = new AIPlayer1(StoneColor.White);

            while (!game.HasEnd)
            {
                Console.WriteLine("");
                ShowBorad(game.Board);
                Console.WriteLine("");
                ShowNextPayer(player1, player2, game);
                int[] points = new int[2];
                points = NextPlayer(player1, player2, game).SelectPoint(game.Board);
                if (!game.PutStone(points[0], points[1], game.NextTurnColor))
                {
                    Console.WriteLine("その場所にはおけません");
                }
            }
            GameEnd(game);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: kkawaguchi/osero
        static void Main(string[] args)
        {
            //ゲームを作成
            Game game = new Game();
            IPlayer player1 = new AIPlayer2(StoneColor.Black);
            IPlayer player2 = new AIPlayer1(StoneColor.White);

            while (!game.HasEnd)
            {
                Console.WriteLine("");
                ShowBorad(game.Board);
                Console.WriteLine("");
                ShowNextPayer(player1, player2, game);
                int[] points = new int[2];
                points = NextPlayer(player1, player2, game).SelectPoint(game.Board);
                if (!game.PutStone(points[0], points[1], game.NextTurnColor))
                {
                    Console.WriteLine("その場所にはおけません");
                }
            }
              GameEnd(game);
        }