http://en.wikipedia.org/wiki/15_puzzle in Qt