<commit_before>package com.bitdecay.game.ui;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.bitdecay.game.MyGame;

public class Body extends Group {
    Image body;
    FillRect foodRect;
    FillRect poopRect;

    public Body(Vector2 screenSize) {
        super();

        // Build body
        body = new Image(MyGame.ATLAS.findRegion("uiStuff/foodBio"));

        // Food
        foodRect = new FillRect();
        foodRect.setColor(Color.GREEN);
        // MAGIC
        foodRect.setBounds(body.getWidth() / 5, body.getHeight() * 0.37f, body.getWidth() * 0.60f, body.getHeight() * 0.33f);

        // Poop
        poopRect = new FillRect();
        poopRect.setColor(Color.BROWN);
        // MAGIC
        poopRect.setBounds(body.getWidth() / 5, 5, body.getWidth() * 0.60f, body.getHeight() * 0.37f);

        addActor(foodRect);
        addActor(poopRect);
        addActor(body);

        float scale = screenSize.y / body.getHeight() - 1;
        scaleBy(scale);
    }

    @Override
    public float getWidth() {
        return body.getWidth();
    }
}<commit_msg>More body visual updates<commit_after>package com.bitdecay.game.ui;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.bitdecay.game.MyGame;

public class Body extends Group {
    Image body;
    FillRect foodRect;
    FillRect poopRect;
    float poopStartY;

    public Body(Vector2 screenSize) {
        super();

        // Body
        body = new Image(MyGame.ATLAS.findRegion("uiStuff/foodBio"));

        // Poop
        poopRect = new FillRect();
        poopRect.setColor(Color.BROWN);
        // MAGIC
        poopRect.setBounds(body.getWidth() / 5, body.getHeight() * 0.09f, body.getWidth() * 0.60f, 1);

        // Food
        foodRect = new FillRect();
        foodRect.setColor(Color.GREEN);
        // MAGIC
        foodRect.setBounds(poopRect.getX(), poopRect.getY() + poopMax(), poopRect.getWidth(), foodMax());

        // Make poop start at bottom of food to make it fill from the top.
        poopStartY = foodRect.getY() - poopRect.getHeight();
        poopRect.setY(poopStartY);

        addActor(foodRect);
        addActor(poopRect);
        addActor(body);

        float scale = screenSize.y / body.getHeight() - 1;
        scaleBy(scale);
    }

    @Override
    public float getWidth() {
        return body.getWidth();
    }

    public float poopMax() {
        return body.getHeight() * 0.30f;
    }

    public float foodMax() {
        return body.getHeight() * 0.31f;
    }

    public void act(float delta) {
        // Poop
        poopRect.setY(poopRect.getY() - 1);
        poopRect.setHeight(poopRect.getHeight() + 1);
        if (poopRect.getHeight() > poopMax()) {
            // TODO Die
            poopRect.setY(poopStartY);
            poopRect.setHeight(1);
        }

        // Food
        foodRect.setHeight(foodRect.getHeight() - 1);
        if (foodRect.getHeight() <= 1) {
            // TODO Die
            foodRect.setHeight(foodMax());
        }
    }
}
{'fraction_non_alphanumeric': 0.1298342541436464, 'fraction_numerical': 0.014426028238182934, 'mean_word_length': 2.2076771653543306, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3097220', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1072, 'n_words': 204}