interface for EightPuzzle and String and the Grid