package fr.iutfbleau.grille;

import android.content.Context;
import android.graphics.Color;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;

public class ControleurCase implements OnTouchListener {

    private final View composant;
    private final GestureDetector gesture;

    public ControleurCase(Context contexte, View composant) {
        this.composant = composant;
        this.gesture = new GestureDetector(contexte, new ControleurGestureCase(composant));
        this.gesture.setOnDoubleTapListener(new ControleurDoubleTap(this.composant));
    }

    @Override
    public boolean onTouch(View v, MotionEvent e) {
        return this.gesture.onTouchEvent(e);
    }
}
