private void createBoard() { spaces = new BoardSpace[row_W, row_W]; int size = 60; for (int k = 0; k < row_W; k++) { for (int i = 0; i < row_W; i++) { spaces[k, i] = new BoardSpace(k, i, size, ((i + k) % 2 == 0) ? Sand : Brown, null); mainCanvas.Children.Add(spaces[k, i].getRect()); } } }