import java.awt.*; import java.util.Enumeration; public class DrawningObjectBoat implements IDrawningObject { private DrawningBoat _boat = null; public DrawningObjectBoat(DrawningBoat boat) { _boat = boat; } @Override public float Step() { if(_boat != null && _boat.Boat != null) return _boat.Boat.GetStep(); return 0; } @Override public void SetObject(int x, int y, int width, int height) { _boat.SetPosition(x,y,width,height); } @Override public void MoveObject(Direction direction) { _boat.MoveTransport(direction); } @Override public void DrawningObject(Graphics g) { _boat.DrawTransport(g); } @Override public float[] GetCurrentPosition() { if(_boat!=null) return _boat.GetCurrentPosition(); return null; } }