C#C
C#4mo ago
0ri3lla-

✅ buttone game.

I got a task is to randomize a 4x4 board with 15 visible buttons and one hidden. When a button
next to the empty space is clicked, the clicked button moves (by animaton) to the empty space : We execute Timer.Start (on button click) and Timer.Stop when the button reaches its movement destination. At each Timer_Tick step, the button moves by a number of pixels and we get an animation-like movement.. The goal is to sort the buttons in ascending order, with the hidden button in the bottom-right corner.

but my problam is that when i click on a button whos next to an invisible one the button tha i clicked on is going stright to the 16th place (i uploaded a vid), can somebody help me figure why ?

code: https://paste.mod.gg/mpzrnnagstod/0
image.png
A tool for sharing your source code with the world!
Was this page helpful?