<commit_before>import Input.InputEventHandler;
import Input.KeyEvent;
import Input.KeyInput;
import Input.MouseEvent;
import Physics.Body;
import Physics.PhysicsEngine;
import Physics.Rectangle;
import Physics.Vector2D;
import Rendering.LWJGL3Renderer;

import java.util.Random;

public class Game implements InputEventHandler {
    private static final int WIDTH = 1280;
    private static final int HEIGHT = 960;
    private static final float SCALE = 100;
    private final LWJGL3Renderer renderer;
    private final PhysicsEngine physics;

    public Game() {
        renderer = new LWJGL3Renderer(WIDTH, HEIGHT, "Physics Demo", this);
        physics = new PhysicsEngine();
        renderer.onRender(this::mainLoop);
        renderer.start();
    }

    private void mainLoop(double dt) {
        physics.step(dt);
    }

    // Helper method to generate a random velocity
    private Vector2D randomVelocityForBody() {
        Random r = new Random();
        return new Vector2D((r.nextFloat()-0.5f)*2.0f, -r.nextFloat()*5.0f);
    }

    // Generate a random width and height between 30 and 80
    private float randomBodyLength() {
        Random r = new Random();<commit_msg>Add ground box to physics engine<commit_after>import Input.InputEventHandler;
import Input.KeyEvent;
import Input.KeyInput;
import Input.MouseEvent;
import Physics.Body;
import Physics.PhysicsEngine;
import Physics.Rectangle;
import Physics.Vector2D;
import Rendering.LWJGL3Renderer;

import java.util.Random;

public class Game implements InputEventHandler {
    private static final int WIDTH = 1280;
    private static final int HEIGHT = 960;
    private static final float SCALE = 100;
    private final LWJGL3Renderer renderer;
    private final PhysicsEngine physics;

    public Game() {
        renderer = new LWJGL3Renderer(WIDTH, HEIGHT, "Physics Demo", this);
        physics = new PhysicsEngine();
        renderer.onRender(this::mainLoop);
        renderer.start();

        // Add a ground box to the physics engine
        Body ground = new Body(
                new Rectangle(0.0f / SCALE, 760.0f / SCALE, 1280.0f / SCALE, 200.0f / SCALE));

        ground.hasGravity = false;
        physics.add(ground);
    }

    private void mainLoop(double dt) {
        physics.step(dt);
    }

    // Helper method to generate a random velocity
    private Vector2D randomVelocityForBody() {
        Random r = new Random();
        return new Vector2D((r.nextFloat()-0.5f)*2.0f, -r.nextFloat()*5.0f);
    }

    // Generate a random width and height between 30 and 80
    private float randomBodyLength() {
        Random r = new Random();
{'fraction_non_alphanumeric': 0.09042553191489362, 'fraction_numerical': 0.025455927051671733, 'mean_word_length': 3.0948678071539657, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1170121', 'n_tokens_mistral': 814, 'n_tokens_neox': 757, 'n_words': 238}