First, you have a sub-class of Actor called Object. Is this just for the thread or is it actually called this? Because you will probably encounter conflicts with java.lang.Object. I’d rename (i.e. GameObject or ActorObject).
Second, for helping with imports you can always use
import java.awt.*;
instead of
import java.awt.Graphics;
import java.awt.Image;
Third, if you want to keep the drawing and acting code separate you could use the Visitor design pattern which uses double dispatch. You keep the same structure where the Actor has a draw method, but it just calls to the Drawer to draw and passes itself in. The Drawer then does the rendering itself. i.e.
public interface Actor
{
public void abstract draw(Drawer g);
}
public class GameObject
{
public void draw(Drawer g);
{
g.draw( this );
}
}
public class NPC
{
public void draw(Drawer g);
{
g.draw( this );
}
}
public class PC
{
public void draw(Drawer g);
{
g.draw( this );
}
}
public class Drawer
{
public void draw(GameObject obj)
{
// code ommitted
}
public void draw(NPC obj)
{
// code ommitted
}
public void draw(PC obj)
{
// code ommitted
}
}
The downside is that every concrete subclass of Actor needs it’s own draw class method so that the JVM can call the correct draw method.
Personally, I just implement the draw method in the Actor and never change any of the Actors variables (i.e. so that the draw method is read only).