コード例 #1
0
        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);
        }
コード例 #2
0
 public CollectPickUpInteractor(
     IFactory <int, IPointEntity> pointFactory,
     IScoreEntity score,
     IFactory <string, ICollectPickUpStructure> structureFactory
     )
 {
     this.pointFactory     = pointFactory;
     this.score            = score;
     this.structureFactory = structureFactory;
 }
コード例 #3
0
 public RenderScoreInteractor(
     IScoreEntity scoreEntity,
     IRenderScorePresenter presenter,
     IRenderScoreTranslator translator
     )
 {
     this.presenter  = presenter;
     this.translator = translator;
     disposable      = new CompositeDisposable();
     scoreEntity.Points.Subscribe(_ => Render(scoreEntity)).AddTo(disposable);
 }
コード例 #4
0
        public void Render(IScoreEntity scoreEntity)
        {
            var structure = translator.Translate(scoreEntity);

            presenter.Render(structure);
        }
コード例 #5
0
 public RenderScoreStructure(IScoreEntity scoreEntity)
 {
     ScoreText = "Count: " + scoreEntity.Points.Value.Value.ToString();
 }
コード例 #6
0
 public IRenderScoreStructure Translate(IScoreEntity param1)
 {
     return(factory.Create(param1));
 }
コード例 #7
0
 public BowlingGameCalculator(IScoreEntity scoreEntity)
 {
     ScoreEntity = scoreEntity;
 }