public void saveGame() {
        BufferedWriter bufferedWriter = null;
        try {
            File oldsave = new File("Data/profile.sav");
            oldsave.delete();
            File newsave = new File("Data/profile.sav");
            newsave.createNewFile();
            bufferedWriter = new BufferedWriter(new FileWriter("Data/profile.sav"));

            //player data

            bufferedWriter.write("" + storyline);
            bufferedWriter.newLine();
            bufferedWriter.write(alec.getName());
            bufferedWriter.newLine();
            bufferedWriter.write("" + alec.getID());
            bufferedWriter.newLine();
            bufferedWriter.write("" + posX_tile);
            bufferedWriter.newLine();
            bufferedWriter.write("" + posY_tile);
            bufferedWriter.newLine();
            bufferedWriter.write("" + money);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge1);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge2);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge3);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge4);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge5);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge6);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge7);
            bufferedWriter.newLine();
            bufferedWriter.write("" + Badge8);
            bufferedWriter.newLine();

            //items

            for (int i = 0; i < 25;) {
                bufferedWriter.write("" + Potions[i].getItemNum());
                bufferedWriter.newLine();
                bufferedWriter.write("" + Potions[i].getAmount());
                bufferedWriter.newLine();
                i++;
            }
            for (int i = 0; i < 15;) {
                bufferedWriter.write("" + Holdables[i].getItemNum());
                bufferedWriter.newLine();
                bufferedWriter.write("" + Holdables[i].getAmount());
                bufferedWriter.newLine();
                i++;
            }
            for (int i = 0; i < 5;) {
                bufferedWriter.write("" + Balls[i].getItemNum());
                bufferedWriter.newLine();
                bufferedWriter.write("" + Balls[i].getAmount());
                bufferedWriter.newLine();
                i++;
            }
            for (int i = 0; i < 10;) {
                bufferedWriter.write("" + Tools[i].getItemNum());
                bufferedWriter.newLine();
                bufferedWriter.write("" + Tools[i].getAmount());
                bufferedWriter.newLine();
                i++;
            }
            bufferedWriter.write("" + potion);
            bufferedWriter.newLine();
            bufferedWriter.write("" + hold);
            bufferedWriter.newLine();
            bufferedWriter.write("" + ball);
            bufferedWriter.newLine();
            bufferedWriter.write("" + tool);
            bufferedWriter.newLine();
            bufferedWriter.write("" + pickaxe);
            bufferedWriter.newLine();
            bufferedWriter.write("" + swim);
            bufferedWriter.newLine();
            bufferedWriter.write("" + machete);
            bufferedWriter.newLine();

            //pokemon

            bufferedWriter.write("" + first.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + first.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + first.getLevel());
            bufferedWriter.newLine();
            bufferedWriter.write("" + second.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + second.getLevel());
            bufferedWriter.newLine();
            bufferedWriter.write("" + third.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + third.getLevel());
            bufferedWriter.newLine();
            bufferedWriter.write("" + fourth.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + fourth.getLevel());
            bufferedWriter.newLine();
            bufferedWriter.write("" + fifth.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + fifth.getLevel());
            bufferedWriter.newLine();
            bufferedWriter.write("" + sixth.getNumber());
            bufferedWriter.newLine();
            bufferedWriter.write("" + sixth.getLevel());
        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try {
                if (bufferedWriter != null) {
                    bufferedWriter.flush();
                    bufferedWriter.close();
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }