title: 2D array displayed on grid using windows forms
body: <p>I am trying to code a battleships game using windows forms in c# and the idea I have is to use a 2d-array with my ships and size and then somehow display it on the grid (inside the grid are buttons)</p>
  
  <p><a href="https://i.stack.imgur.com/JukHi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JukHi.png" alt=""></a></p>
  
  <p>I have figured out how to get the position of the buttons and such like by using sender and then being able to change the color of them however I need to be able to "attach" my 2d-array with the ships to the grid and then change the buttons that have the ships to grey for the user, if you have any code to show me how to do this that would be great.</p>