Chapter4 Puzzle class