package code;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;


public class SaveGame {
	
	public static void main( String arg[]){
		SaveGame s = new SaveGame();
	}

	public void Save(String s){
		
		String save = s;
		save.concat("Game.java");
		 try {
		        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(save));
		        oos.writeObject(oos);
		        oos.close();
		    } catch(Exception ex) {
		        ex.printStackTrace();
		    }
	}
	public void Load(String s){
		
	    if(s.contains("Gave.java")){
	        try {
	        	ObjectInputStream ois = new ObjectInputStream(new FileInputStream(s));
	        	SaveGame sg = (SaveGame)ois.readObject();
	        	ois.close();
	        } catch(Exception ex) {
	            ex.printStackTrace();
	        }
	    }
	}
}



@@ -26,27 +26,25 @@
 ava.
-io
+awt
 .File
-InputStream;
+Dialog;%0D%0A
 %0D%0Aim
@@ -56,104 +56,56 @@
 java
-.io.FileOutputStre
+x.swing.JFr
 am
+e
 ;%0D%0A
-import java.io.ObjectInputStream;%0D%0Aimport java.io.ObjectOutputStream;%0D%0A%0D%0A
+%0D%0A%0D%0A@SuppressWarnings(%22unused%22)
 %0D%0Apu
@@ -159,21 +159,21 @@
 ain(
- 
 String
+%5B%5D
  arg
-%5B%5D
+s
 )%7B%0D%0A
@@ -183,17 +183,17 @@
 aveGame 
-s
+t
  = new S
@@ -208,16 +208,17 @@
 );%0D%0A%09%7D%0D%0A
+%09
 %0D%0A%09publi
@@ -223,647 +223,291 @@
 lic 
-void Save(String s)%7B%0D%0A%09%09%0D%0A%09%09String save = s;%0D%0A%09%09save.concat(%22Game.java%22);%0D%0A%09%09 try %7B%0D%0A%09%09        ObjectOutputStream 
+SaveGame()%7B%0D%0A%09%09JFrame j = new JFrame();%0D%0A%09%09FileDialog ch
 oos
+er
  = new 
-ObjectOutputStream(new FileOutputStream(save));%0D%0A%09%09        oos.writeObject(oos);%0D%0A%09%09        oos.close();%0D%0A%09%09    %7D catch(Exception ex) %7B%0D%0A%09%09        ex.printStackTrace();%0D%0A%09%09    %7D%0D%0A%09%7D%0D%0A%09public void Load(String s)%7B%0D%0A%09%09%0D%0A%09    if(s.contains(%22Gave.java%22))%7B%0D%0A%09        try %7B%0D%0A%09        %09ObjectInputStream ois = new ObjectInputStream(new FileInputStream(s));%0D%0A%09        %09SaveGame sg = (SaveGame)ois.readObject();%0D%0A%09        %09ois.close();%0D%0A%09        %7D catch(Exception ex) %7B%0D%0A%09            ex.printStackTrace();%0D%0A%09        %7D%0D%0A%09    %7D
+FileDialog(j);%0D%0A%09%09chooser.setDirectory(%22C:%5C%5C%22);%0D%0A%09%09chooser.setFile(%22*.txt%22);%0D%0A%09%09chooser.setVisible(true);%0D%0A%09%09String filename = chooser.getFile();%0D%0A%09%09String path = chooser.getDirectory();%0D%0A%09%09System.out.println(path);
 %0D%0A%09%7D
@@ -511,12 +511,8 @@
 %0A%09%7D%0D%0A%7D%0D%0A
-%0D%0A%0D%0A

save game