<commit_before>package me.vrekt.lunar.entity;

import me.vrekt.lunar.collision.BoundingBox;
import me.vrekt.lunar.location.Location;
import me.vrekt.lunar.tile.Tile;
import me.vrekt.lunar.utilities.Utilities;
import me.vrekt.lunar.world.World;
import me.vrekt.lunar.world.dir.Direction;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;

public abstract class Entity {

    protected Location location;
    protected int x, y;
    protected int width, height;
    protected int entityID;

    protected BoundingBox boundingBox;
    protected BufferedImage texture;

    /**
     * Initialize the entity.
     */
    public Entity(int x, int y, int width, int height, int entityID) {
        this.x = x;
        this.y = y;

        this.width = width;
        this.height = height;
        this.entityID = entityID;
        this.location = new Location(x, y);

        boundingBox = new BoundingBox(x, y, width, height);

    }

    /**
     * Initialize the entity.
     */
    public Entity(int x, int y, int width, int height, int entityID, BoundingBox bb) {
        this(x, y, width, height, entityID);
        boundingBox = bb;

    }

    /**
     * Initialize the entity.
     */
    public Entity(BufferedImage texture, int x, int y, int width, int height, int entityID) {
        this(x, y, width, height, entityID);

        this.texture = texture;

    }

    /**
     * Initialize the entity.
     */
    public Entity(BufferedImage texture, int x, int y, int width, int height, int entityID, BoundingBox bb) {
        this(x, y, width, height, entityID, bb);

        this.texture = texture;

    }

    public abstract void drawEntity(Graphics graphics);

    public abstract void updateEntity();

    /**
     * Update the entity boundingBox.
     */
    public void updateBoundingBox() {
        boundingBox.update(x, y, width, height);
    }

    /**
     * Get the location.
     */
    public Location getLocation() {
        return location;
    }

    /**
     * Get the X
     */
    public int getX() {
        return x;
    }

    /**
     * Get the Y
     */<commit_msg>Add more javadoc to Entity.java<commit_after>package me.vrekt.lunar.entity;

import me.vrekt.lunar.collision.BoundingBox;
import me.vrekt.lunar.location.Location;
import me.vrekt.lunar.tile.Tile;
import me.vrekt.lunar.utilities.Utilities;
import me.vrekt.lunar.world.World;
import me.vrekt.lunar.world.dir.Direction;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;

public abstract class Entity {

    protected Location location;
    protected int x, y;
    protected int width, height;
    protected int entityID;

    protected BoundingBox boundingBox;
    protected BufferedImage texture;

    /**
     * Initialize the entity; this is the primary constructor.
     * @param x The x position of this entity.
     * @param y The y position of this entity.
     * @param width The width of this entity.
     * @param height The height of this entity.
     * @param entityID A number uniquely identifiying this enemy.
     */
    public Entity(int x, int y, int width, int height, int entityID) {
        this.x = x;
        this.y = y;

        this.width = width;
        this.height = height;
        this.entityID = entityID;
        this.location = new Location(x, y);

        boundingBox = new BoundingBox(x, y, width, height);

    }

    /**
     * Convenience constructor that allows you to
     * specify a BoundingBox to use with this entity.
     * @param x The x position of this entity.
     * @param y The y position of this entity.
     * @param width The width of this entity.
     * @param height The height of this entity.
     * @param entityID A number uniquely identifiying this enemy.
     * @param bb The collision box for this entity.
     */
    public Entity(int x, int y, int width, int height, int entityID, BoundingBox bb) {
        this(x, y, width, height, entityID);
        boundingBox = bb;

    }

    /**
     * Convenience constructor that allows you to provide a
     * BufferedImage to use as a texture for this entity.
     * @param texture The image to use as a texture for this entity.
     * @param x The x position of this entity.
     * @param y The y position of this entity.
     * @param width The width of this entity.
     * @param height The height of this entity.
     * @param entityID A number uniquely identifiying this enemy.
     */
    public Entity(BufferedImage texture, int x, int y, int width, int height, int entityID) {
        this(x, y, width, height, entityID);

        this.texture = texture;

    }

    /**
     * Convenience constructor that allows you to supply both a BufferedImage
     * and a BoundingBox.
     * @param texture The image to use as a texture for this entity.
     * @param x The x position of this entity.
     * @param y The y position of this entity.
     * @param width The width of this entity.
     * @param height The height of this entity.
     * @param entityID A number uniquely identifiying this enemy.
     * @param bb The collision box for this entity.
     */
    public Entity(BufferedImage texture, int x, int y, int width, int height, int entityID, BoundingBox bb) {
        this(x, y, width, height, entityID, bb);

        this.texture = texture;

    }

    /**
     * Draw the entity's visual representation herea
     * @param graphics A Graphics object for this method to draw to. It
     * is the responsibility of the caller to make sure the Graphics object
     * passed in is displayed on the screen.
     */
    public abstract void drawEntity(Graphics graphics);

    public abstract void updateEntity();

    /**
     * Update the entity boundingBox.
     */
    public void updateBoundingBox() {
        boundingBox.update(x, y, width, height);
    }

    /**
     * Get the location.
     */
    public Location getLocation() {
        return location;
    }

    /**
     * Get the X
     */
    public int getX() {
        return x;
    }

    /**
     * Get the Y
     */
{'fraction_non_alphanumeric': 0.09139872694630324, 'fraction_numerical': 0.0, 'mean_word_length': 2.3744493392070485, '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': '3614305', 'n_tokens_mistral': 1841, 'n_tokens_neox': 1769, 'n_words': 655}