/**
 * auteurs          : Michel Landschoot
 * mail             : direction@landsnet.com
 * date de création : 2013-12-21
 * description      : classe de filtrage des figures satisfaisant une condition
 */

#ifndef FILTRAGE_H
#define FILTRAGE_H
#include <stdlib.h>     /* srand, rand */
#include <time.h>       /* time */
#include <list>
#include "figure.hpp"
#include "condition.h"

using namespace std;

class Filtrage
{
public:
    static void remplitAlea(list<int> entiers, int n);
    static int compterSi(list<Figure *> figures, Condition * condition, bool test);
    static bool supprimerSi(list<Figure *> & figures, Condition * condition);
    static bool supprimerSiBis(list<Figure *> & figures, Condition * condition);
    static bool supprimerSiProfond(list<Figure *> & figures, Condition * condition);
    static bool supprimerSiProfondBis(list<Figure *> & figures, Condition * condition);
    static Figure * getUneFigure(int x, int y);
    static list<Figure *> creerFigures(int n);
};

#endif
