diff --git a/Winda/src/winda/logic/Logger.java b/Winda/src/winda/logic/Logger.java new file mode 100644 index 0000000..7b11cc9 --- /dev/null +++ b/Winda/src/winda/logic/Logger.java @@ -0,0 +1,35 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package winda.logic; + +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author Tomek + */ +public class Logger { + public Logger (Pasazer [] pasazerowie, int [] trasa){ + //Jeszcze nie jestem pewien argumentów jakie przyjmuje konstruktor + //i nie wiem co tak naprawdę jest w trasie + } + + public void SaveLog(String filename){ + FileWriter fw = null; + try { + fw = new FileWriter(filename); + for (String s : log) + fw.write(s+'\n'); + } catch (IOException ex) { + java.util.logging.Logger.getLogger(Parser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + } + + private List log = new ArrayList(); +}