Click on the square pieces.
If they can be slid horizontally or vertically
to the empty (black) space, they will slide.

If you want a game like this for your site, ask Kien
www.caoxuan.com