I need to figure out how to differentiate between integers in my save file:
0,595,1
0,611,0
0,627,2
0,643,2
0,659,2
0,675,2
I want this to translate to:
x,y,blockType
each line of numbers represent a new block to be spawn when this file is called. I just need to figure out how to tell which number goes for which variable. The x,y,and blocktype are all stored in arraylists and can already be used to spawn blocks.
here is my reading files code so far:
public static void ReadFile(String path){
try {
FileInputStream fStream = new FileInputStream(path);
BufferedReader in = new BufferedReader(new InputStreamReader(fStream));
while (in.ready()) {
System.out.println(in.readLine());
}
in.close();
} catch (IOException e) {
System.out.println("File input error");
}
}
thanks for your help