コード例 #1
0
        private static Grid GenerateBoard(BoardCoordinates boardSizeBounds, BoardViewState boardViewState)
        {
            var board = CreateBoard(boardSizeBounds);

            var columns = boardSizeBounds.GetColumnRange().ToList();
            var rows    = boardSizeBounds.GetRowRange().ToList();

            CreateColumnHeaders(columns, board);
            CreateRowHeaders(rows, board);
            CreateBoardContent(columns, rows, board, boardViewState);
            return(board);
        }
コード例 #2
0
 private static TextBlock[][] GenerateBoard(BoardCoordinates dimensions) =>
 dimensions.GetColumnRange()
 .Select(_ => GenerateRow(dimensions))
 .ToArray();