From 7d936c5cec30e53a6ad06b7a687c675deb8db3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ogrodowski?= Date: Tue, 12 Apr 2011 10:06:24 +0000 Subject: [PATCH] --- Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java b/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java index 1a621aa..954d952 100644 --- a/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java +++ b/Winda/src/winda/logic/AlgorytmNajblizszeWezwanie.java @@ -122,10 +122,15 @@ public class AlgorytmNajblizszeWezwanie implements IAlgorytm{ } for(i = 0; i < t.length; i++){ + int j; int ilee=0; - while(t[i]==t[i+1]){ - ilee++; + for(j = 0; j < i; j++){ + if(t[i]==t[i+1]){ + ilee++; + i++; + } } + ttt[i][0] = i; ttt[i][1] = ilee; ttt[i][2] = 1;