예제 #1
0
        private static void Main(string[] args)
        {
            Goban  goban   = new StandardGoban(19, 19);
            Player player1 = new HumanPlayer()
            {
                Name = "Human", Color = Color.Black
            };
            Player player2 = new ComputerPlayer()
            {
                Name = "Computer", Color = Color.White
            };
            Game game = new Game(goban, new Player[] { player1, player2 });

            drawGoban(goban);
            bool stop    = false;
            int  counter = 0;

            while (!stop)
            {
                nextTurn(game);
                System.Threading.Thread.Sleep(1000);
                stop = counter++ > 10;
            }
            System.Console.CursorSize = 100;
            writeAt(0, goban.GetHeight() + 3, "C'est crazy fini !", true);
        }
예제 #2
0
        public void GetHeight()
        {
            var goban = new StandardGoban(7, 9);

            Assert.AreEqual(7, goban.GetHeight());
            Assert.AreEqual(9, goban.GetWidth());
        }