An implementation of the 15-puzzle