private AutoUt autoUtGeneralas() { Terkep terkep = Terkep.terkepEloallitasFilebol(terkepFileName); this.terkepX = terkep.tablazat.GetLength(0); this.terkepY = terkep.tablazat.GetLength(1); List <Szenzor> szenzorAdatok = Szenzor.szenzorAdatokEloallitasFilebol(szenzorFileName); return(new AutoUt(terkep, szenzorAdatok)); }
public AutoUt(Terkep terkep, List <Szenzor> szenzorAdatok) { this.idopillanatok = new List <Auto>(); Koordinata lastPos = new Koordinata(0, 0); foreach (Szenzor item in szenzorAdatok) { Auto a = new Auto(); if (item.koordinata == null) { a.koord = lastPos; } else { a.koord = item.koordinata; } a.motorAllapot = null; lastPos = a.koord; this.idopillanatok.Add(a); } }