I have a sudoku game, where I want to autogenerate a sudoku, so that the player can solve it.
When I have generated the numbers in the 2d-Array, which I already did, I want to make these values visible to the user by putting them onto the text-property of 81 buttons. The buttons are all named in a similar manner. (sudoku_0_0, sudoku_0_1 etc.- The first number is the x-Coordinate and the second number is the y-Coordinate)
Can I put values on the buttons with a loop? Like:
for(var x=0;x<=8;x++){
for(var y=0;y<=8;y++){
sudoku_x_y.Text = "Hello"
}
}
Obviously this doesn't work, but is there a way to do something similar to this?