Exemple #1
0
        public static string PlaceToken(string board)
        {
            var validator     = new BoardDimensionValidator();
            var boardCreater  = new BoardCreator(validator);
            var tiledBoard    = boardCreater.Create(board);
            var stateReceiver = new StateReceiver(tiledBoard);

            return(stateReceiver.GetBestPosition());
        }
Exemple #2
0
        public void TestOneRowTable()
        {
            var validator    = new BoardDimensionValidator();
            var boardCreator = new BoardCreator(validator);
            var board        = boardCreator.Create(@"5 1
            X O O O . ");

            Assert.AreEqual(Color.Red, board.GetColor(0, 0));
            Assert.AreEqual(Color.Black, board.GetColor(0, 1));
            Assert.AreEqual(Color.Empty, board.GetColor(0, 4));
        }