package edu.stuy.starlorn.entities;

/*
 * An object moving around the world. This shouldn't be used directly -- It should be subclassed and extended.
 */
public class Entity {
    private double _x, _y;
    
    public Entity(double x, double y) {
        _x = x;
        _y = y;
    }

    public Entity() {
        this(0,0);
    }

    /* 
     * Used for handling things that need to be done before anyone takes action.
     */
    public void preStep() {
    }

    /*
     * Used for taking actions (moving, shooting, etc)
     */
    public void step() {
        System.out.printf("X: %.1f, Y: %.1f\n",getX(), getY());
        setXY(getX()-1 + Math.random() * 2, getY()-1 + Math.random() * 2);
    }

    /*
     * Used for cleanup after the step
     */
    public void postStep() {
    }

    public void setX(double x) {
        _x = x;
    }
    public double getX() {
        return _x;
    }

    public void setY(double y) {
        _y = y;
    }
    public double getY() {
        return _y;
    }

    public void setXY(double x, double y) {
        setX(x);
        setY(y);
    }
}

@@ -201,16 +201,45 @@
 _y;%0A    
+private int _width, _height;%0A
 %0A    pub
@@ -259,32 +259,55 @@
 uble x, double y
+, int width, int height
 ) %7B%0A        _x =
@@ -322,24 +322,147 @@
     _y = y;%0A
+        _width = width;%0A        _height = height;%0A    %7D%0A%0A    public Entity(double x, double y) %7B%0A        this(x, y, 0, 0);%0A
     %7D%0A%0A    p
@@ -1175,32 +1175,290 @@
 turn _y;%0A    %7D%0A%0A
+    public void setWidth(int width) %7B%0A        _width = width;%0A    %7D%0A    public int getWidth() %7B%0A        return _width;%0A    %7D%0A%0A    public void setHeight(int height) %7B%0A        _height = height;%0A    %7D%0A    public int getHeight() %7B%0A        return _height;%0A    %7D%0A%0A
     public void 

Add width and height to Entity