Question by
cupcakehox · Jun 07, 2018 at 12:56 PM ·
c#buttonsgrid based game
Neighbor buttons in a grid game
Hello guys,
I am doing a grid based game consisting of 36 buttons in a 6x6 grid.The point of the game is to "connect" the buttons assigned with stars without touching the buttons assigned with mines.The mines and stars are assigned randomly.The buttons which are assigned with stars(two buttons) will be interactable, the others not.What I want to do is make the neighbor buttons of the star buttons interactable, in order for the player to connect the star buttons.How am I supposed to do that, can someone point me in the right direction?Another thing i should probably mention, star buttons can be only the outer buttons so the ones in the indexes(0, 1, 2, 3, 4, 5, 6, 11, 12, 17, 18, 23, 24, 29, 30, 31, 32, 33, 34, 35).
untitled.png
(350.4 kB)
Comment