namespace ArmoredVehicle { internal class DrawningObject : IDrawningObject { private DrawingArmoredVehicle _machine = null; public DrawningObject(DrawingArmoredVehicle machine) { _machine = machine; } public float Step => _machine?.ArmoredVehicle?.Step ?? 0; public (float Left, float Right, float Top, float Bottom) GetCurrentPosition() { return _machine?.GetCurrentPosition() ?? default; } public void MoveObject(Direction direction) { _machine?.MoveTransport(direction); } public void SetObject(int x, int y, int width, int height) { _machine.SetPosition(x, y, width, height); } void IDrawningObject.DrawningObject(Graphics g) { _machine.DrawTransport(g); } } }