Ejemplo n.º 1
0
        public BoardState Clone()
        {
            var width     = Board.GetLength(0);
            var height    = Board.GetLength(1);
            var boardCopy = new BoardCell[width, height];

            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    boardCopy[i, j] = Board[i, j];
                }
            }
            return(new BoardState(MyLines, OppLines, Type, Depth, MinDepth, MaxWidth, boardCopy));
        }