public void writeFile()
	{
		File file=new File("monsters.dat");
		FileOutputStream fout;
		ObjectOutputStream out;
		
		try {
			fout=new FileOutputStream(file);
			out=new ObjectOutputStream(fout);
			out.writeObject(current_id-2);
			out.flush();
			for(int i=0; i<current_id-1; i++){
				out.writeObject(monsters.get(i));
				out.flush();
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}