private void UpdateRoverPosition(PositionUpdate update) { if (IsDisposed) { return; } _renderData.UpdateRoverPos(update); Render(_renderData); }
public void UpdateRoverPos(PositionUpdate update) { if (!BottomRight.Contains(update.Previous)) { throw new ArgumentOutOfRangeException(nameof(update), update.Previous, "Previous position must lie within bottom right position."); } if (!BottomRight.Contains(update.New)) { throw new ArgumentOutOfRangeException(nameof(update), update.New, "New position must lie within bottom right position."); } RoverPosition = update.New; }