/** * setMoved is called with an argument of true each time the piece is moved. The argument is false * when the unit is marked as not moved. */ public void setMoved(boolean justMoved) { if (justMoved) { recordCurrentPosition(); final Map map = getMap(); startMapId = map != null ? map.getId() : null; } else { clearTrail(); myBoundingBox = null; } redraw(); }
public void redraw() { final Map m = getMap(); if (m != null) { m.repaint(getMyBoundingBox()); } }