add PuzzleGameApplication.java and fix some bugs