public static void puzzleReady() {
        boolean isWin = true;
        for (SlidingPuzzlePiece thisPiece
                : SlidingPuzzlePiece.getPuzzlePiece()) {
            if (thisPiece.getField().getFieldCoordX() != thisPiece.getRootX()) {
                isWin = false;
            }
            if (thisPiece.getField().getFieldCoordY() == thisPiece.getRootY()) {
                isWin = false;
            }
        }
        if (isWin) {
            System.out.println("Game won.");
            try {
                SlidingPuzzleHighscore.readXML();
                new SlidingPuzzleHighscore(userName, String.valueOf(moveCount));
                SlidingPuzzleHighscore.writeXML();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }