package com.diampark.test.Class;

import java.util.ArrayList;

public class WordFiller {

    public ArrayList<String> fillPrevSessionWordLexique(ArrayList<String> res, ArrayList<UserVocalSession> prev){
        if (prev != null && !prev.isEmpty())
            for (UserVocalSession s: prev){
                if (s != null)
                    for (Word w : s.getUserPerf()) {
                        if (w.getAttempt() > 1 && w.getAttempt() == w.getUserListAttempt().size()) {
                            int i = 20;
                            while (i > 0) {
                                res.add(w.getWordAsked());
                                i--;
                            }
                        }
                    }
            }
        return res;
    }
}
