diff --git a/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java b/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java index 3af0a28..8986101 100644 --- a/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java +++ b/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java @@ -10,14 +10,18 @@ package winda.logic; * @author Tomek */ public class AlgorytmNajblizszeWezwanie implements IAlgorytm{ - int pietroWindy = 1; - int maxPietro = 12; + int pietroWindy = 1; + int maxPietro; int minPietro = 1; int stop = 0; int start = 0; + Winda ww = new Winda(); Pasazer p = new Pasazer(0,0,0); + + public int[] Trasa(Pasazer[] pasazerowie){ + maxPietro = ww.GetIloscPieter(); int [] t = new int[2*pasazerowie.length+1]; int tab_len = 0; int iluPasazerow = 0; @@ -120,4 +124,4 @@ public class AlgorytmNajblizszeWezwanie implements IAlgorytm{ return t; } -} +} \ No newline at end of file diff --git a/Winda/src/winda/logic/Winda.java b/Winda/src/winda/logic/Winda.java index f21bd6e..0effea0 100644 --- a/Winda/src/winda/logic/Winda.java +++ b/Winda/src/winda/logic/Winda.java @@ -82,6 +82,10 @@ public class Winda { CzasSredniObslugi = CzasJazdy / IloscPasazerow; } + public int GetIloscPieter(){ + return this.IloscPieter; + } + public static void main(String[] args) { Winda w = new Winda();