public RenderWinTextInteractor(IScoreEntity score, IRenderWinTextPresenter presenter) { presenter.SetText(""); disposable = new CompositeDisposable(); score.Points.Where(point => point.Value >= 12) .Subscribe(_ => presenter.SetText("You Win!")) .AddTo(disposable); }
public CollectPickUpInteractor( IFactory <int, IPointEntity> pointFactory, IScoreEntity score, IFactory <string, ICollectPickUpStructure> structureFactory ) { this.pointFactory = pointFactory; this.score = score; this.structureFactory = structureFactory; }
public RenderScoreInteractor( IScoreEntity scoreEntity, IRenderScorePresenter presenter, IRenderScoreTranslator translator ) { this.presenter = presenter; this.translator = translator; disposable = new CompositeDisposable(); scoreEntity.Points.Subscribe(_ => Render(scoreEntity)).AddTo(disposable); }
public void Render(IScoreEntity scoreEntity) { var structure = translator.Translate(scoreEntity); presenter.Render(structure); }
public RenderScoreStructure(IScoreEntity scoreEntity) { ScoreText = "Count: " + scoreEntity.Points.Value.Value.ToString(); }
public IRenderScoreStructure Translate(IScoreEntity param1) { return(factory.Create(param1)); }
public BowlingGameCalculator(IScoreEntity scoreEntity) { ScoreEntity = scoreEntity; }