package cz.vutbr.feec.iodata;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class WriteResults {
	
	public static void writeComputedPosition(String fileName, String line) {
		fileName = "results/" + fileName;
		try {
			File file = new File(fileName);
			if(!file.exists()) file.createNewFile();
			FileWriter fw = new FileWriter(fileName, true);
			BufferedWriter out = new BufferedWriter(fw);
			out.write(line);
			out.newLine();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}
