<commit_before>package frs.amantonrun;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class GamePlayActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(new GameView(this));
    }
}<commit_msg>Le point suit le doigt<commit_after>package frs.amantonrun;

import android.content.pm.ActivityInfo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.ImageView;

public class GamePlayActivity extends AppCompatActivity {

    public static ImageView i;
    private float x;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        setContentView(R.layout.activity_game);
        i = (ImageView) findViewById(R.id.imageView);

        DisplayMetrics ecran = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(ecran);
        int largeur = ecran.widthPixels;

        Log.i("TAG",largeur+"");

        this.x = largeur/2;
    }

    public boolean onTouchEvent(MotionEvent event) {
        Log.i("TAG",this.x+" "+event.getX()+" "+Math.abs(this.x-event.getX()));

        if(Math.abs(this.x-event.getX()) < 50)
        {
            i.setX(event.getX());
            this.x= event.getX();
            Log.i("TAG","OK");
        }
        else
        {
            Log.i("TAG","!OK");
        }
        return true;
    }
}
{'fraction_non_alphanumeric': 0.1169139465875371, 'fraction_numerical': 0.002967359050445104, 'mean_word_length': 3.0626506024096387, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139747', 'n_tokens_mistral': 510, 'n_tokens_neox': 487, 'n_words': 90}