<commit_before>package ldm2468.swipe;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;

public class Main extends ApplicationAdapter {
    public static SwipeManager swipeManager;
    public static GooglePlay googlePlay;
    public static final String
            A_PACIFIST = "CgkIlcaq894XEAIQAg",
            A_10KP = "CgkIlcaq894XEAIQAw",
            A_100KP = "CgkIlcaq894XEAIQBA",
            A_500KP = "CgkIlcaq894XEAIQBQ",
            A_LV_100 = "CgkIlcaq894XEAIQBg",
            A_LV_300 = "CgkIlcaq894XEAIQBw",
            A_LV_500 = "CgkIlcaq894XEAIQCA",
            L_SCORE = "CgkIlcaq894XEAIQAQ",
            L_LV = "CgkIlcaq894XEAIQCQ";

    ShapeRenderer sr;
    SpriteBatch batch;
    BrickGrid brickGrid;
    Viewport viewport;
    static final int WIDTH = 7, HEIGHT = 12;
    int i = 0;

    @Override
    public void create() {
        swipeManager = new SwipeManager();
        (brickGrid = new BrickGrid(WIDTH, HEIGHT)).loadSave();
        (viewport = new ScreenViewport()).apply();
        (sr = new ShapeRenderer()).setProjectionMatrix(viewport.getCamera().combined);
        (batch = new SpriteBatch()).setProjectionMatrix(viewport.getCamera().combined);
        Gdx.input.setInputProcessor(swipeManager);
        Gdx.graphics.setContinuousRendering(false);
        Gdx.graphics.requestRendering();
        //googlePlay.login();
    }

    @Override
    public void render() {
        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
        //skip (debug)
        if (Gdx.input.isKeyJustPressed(Input.Keys.S))
            brickGrid.push();
        //process swipe
        if (swipeManager.justDragged()) {
            if (swipeManager.y1 <= brickGrid.playBarHeight && swipeManager.y2 <= brickGrid.playBarHeight) {
                if (swipeManager.x1 <= Gdx.graphics.getWidth() / 2 && swipeManager.x2 <= Gdx.graphics.getWidth() / 2)
                    googlePlay.showAchievements();
                else if (swipeManager.x1 >= Gdx.graphics.getWidth() / 2 && swipeManager.x2 >= Gdx.graphics.getWidth() / 2)
                    googlePlay.showLeaderboards();
            } else if (!brickGrid.isRunning)<commit_msg>Prevent swipe from google play buttons<commit_after>package ldm2468.swipe;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;

public class Main extends ApplicationAdapter {
    public static SwipeManager swipeManager;
    public static GooglePlay googlePlay;
    public static final String
            A_PACIFIST = "CgkIlcaq894XEAIQAg",
            A_10KP = "CgkIlcaq894XEAIQAw",
            A_100KP = "CgkIlcaq894XEAIQBA",
            A_500KP = "CgkIlcaq894XEAIQBQ",
            A_LV_100 = "CgkIlcaq894XEAIQBg",
            A_LV_300 = "CgkIlcaq894XEAIQBw",
            A_LV_500 = "CgkIlcaq894XEAIQCA",
            L_SCORE = "CgkIlcaq894XEAIQAQ",
            L_LV = "CgkIlcaq894XEAIQCQ";

    ShapeRenderer sr;
    SpriteBatch batch;
    BrickGrid brickGrid;
    Viewport viewport;
    static final int WIDTH = 7, HEIGHT = 12;
    int i = 0;

    @Override
    public void create() {
        swipeManager = new SwipeManager();
        (brickGrid = new BrickGrid(WIDTH, HEIGHT)).loadSave();
        (viewport = new ScreenViewport()).apply();
        (sr = new ShapeRenderer()).setProjectionMatrix(viewport.getCamera().combined);
        (batch = new SpriteBatch()).setProjectionMatrix(viewport.getCamera().combined);
        Gdx.input.setInputProcessor(swipeManager);
        Gdx.graphics.setContinuousRendering(false);
        Gdx.graphics.requestRendering();
        //googlePlay.login();
    }

    @Override
    public void render() {
        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
        //skip (debug)
        if (Gdx.input.isKeyJustPressed(Input.Keys.S))
            brickGrid.push();
        //process swipe
        if (swipeManager.justDragged()) {
            if (swipeManager.y1 <= brickGrid.playBarHeight) {
                if (swipeManager.y2 <= brickGrid.playBarHeight) {
                    if (swipeManager.x1 <= Gdx.graphics.getWidth() / 2 && swipeManager.x2 <= Gdx.graphics.getWidth() / 2)
                        googlePlay.showAchievements();
                    else if (swipeManager.x1 >= Gdx.graphics.getWidth() / 2 && swipeManager.x2 >= Gdx.graphics.getWidth() / 2)
                        googlePlay.showLeaderboards();
                }
            } else if (!brickGrid.isRunning)
{'fraction_non_alphanumeric': 0.11091234347048301, 'fraction_numerical': 0.028225004969191017, 'mean_word_length': 2.6569767441860463, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '4490200', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1682, 'n_words': 281}