i have to make a game like

5 4 8
9 6 1
2 3

to be able to move the tiles from spot to spot...i got down to making the tiles appear randomly but the moving is giving trouble

help meeeeee

in pascal