public IPreparationUnitModel Create(IShopUnitModel shopUnit) { var model = _preparationUnitModelFactory.Create(shopUnit.Id.Value); model.MoveTo(false, _benchModel.GetFirstFreePosition()); var view = _preparationUnitViewFactory.Instantiate(); _preparationUnitControllerFactory.Create(model, view); return(model); }
public void MoveTo(bool isOnBoard) { MoveToPool(isOnBoard); SetPosition(isOnBoard ? _boardModel.GetFirstFreePosition() : _benchModel.GetFirstFreePosition()); }