N
nnd10
Guest
I would like to create a Shuffle Game in Visual Basic 2019
This shuffle game contains
One table layout panel (3x3)
Nine buttons named from Button1 to Button9, and the button texts are named from 1 to 9
The puzzle auto shuffle when i'm start the form (start debuging)
When I click on a button inside the table layout panel, the button moves into the empty spot next to it in any direction (Up, Left, Right, Bottom), if there's no empty spot next to the button then nothing happens when I click on it.
The shuffle game ends once all the numbers are in order from 1 to 9, and a message shows that the game has been completed, in whatever number of times I clicked the buttons, e.g. if I arranged all the numbers in order in 17 clicks, the message says: You completed this game in 17 clicks.
I want to know how to do this, please tell me, and if any of you who answers the question think I need to add a button16 into the empty spot of the table layout panel and make the text of that button blank, tell me.
P.S
I have seen similar tutorials on how to create shuffle game in vb on youtube, but in those tutorials they worked through all the button click event code, and they also worked through all the buttons in the checking the puzzle solved code (which I do not want to do because it would not be convenient).
Thanks
Continue reading...
This shuffle game contains
One table layout panel (3x3)
Nine buttons named from Button1 to Button9, and the button texts are named from 1 to 9
The puzzle auto shuffle when i'm start the form (start debuging)
When I click on a button inside the table layout panel, the button moves into the empty spot next to it in any direction (Up, Left, Right, Bottom), if there's no empty spot next to the button then nothing happens when I click on it.
The shuffle game ends once all the numbers are in order from 1 to 9, and a message shows that the game has been completed, in whatever number of times I clicked the buttons, e.g. if I arranged all the numbers in order in 17 clicks, the message says: You completed this game in 17 clicks.
I want to know how to do this, please tell me, and if any of you who answers the question think I need to add a button16 into the empty spot of the table layout panel and make the text of that button blank, tell me.
P.S
I have seen similar tutorials on how to create shuffle game in vb on youtube, but in those tutorials they worked through all the button click event code, and they also worked through all the buttons in the checking the puzzle solved code (which I do not want to do because it would not be convenient).
Thanks
Continue reading...