Esempio n. 1
0
        public override async Task<Point> NextMoveAsync(BoardFieldSign[,] arenaInfo)
        {
            var point = new Point();
            do
            {
                point.X = _rand.Next(0, 3);
                point.Y = _rand.Next(0, 3);
            } 
            while (arenaInfo[point.X,point.Y] != BoardFieldSign.Empty);

            return point;
        }
Esempio n. 2
0
        private BoardFieldSign[,] ExportBoardState()
        {
            var result = new BoardFieldSign[3, 3];

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    result[i, j] = TicTacToeViewModel.Board[i, j];
                }
            }

            return(result);
        }
Esempio n. 3
0
        private BoardFieldSign[,] ExportBoardState()
        {
            var result = new BoardFieldSign[3, 3];
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    result[i, j] = TicTacToeViewModel.Board[i, j];
                }
            }

            return result;
        }