diff --git a/src/main/java/fr/ntr/scheduler/RoundRobin.java b/src/main/java/fr/ntr/scheduler/RoundRobin.java index 4790b24..bb781de 100644 --- a/src/main/java/fr/ntr/scheduler/RoundRobin.java +++ b/src/main/java/fr/ntr/scheduler/RoundRobin.java @@ -56,13 +56,11 @@ public class RoundRobin extends Scheduler { private User UserSelection(int Ts, int Sp, List Users) { - //for (int i = 0; i < Ts; i++) { - // for (int j = 0; j < Sp; j++) { - // index++; - // } - //} - - index = (Ts + 1) * (Sp + 1); + for (int i = 0; i < Ts; i++){ + for (int j = 0; j < Sp; j++) { + index++; + } + } return Users.get(index%(Users.size() - 1)); }