예제 #1
0
 public Game(IOutputHandler outputHandler, INumberHandler numberHandler, INumberProvider numberProvider)
 {
     this.model          = model;
     this.outputHandler  = outputHandler;
     this.numberHandler  = numberHandler;
     this.numberProvider = numberProvider;
 }
예제 #2
0
        public ViewResult FizzBuzz()
        {
            var   outputList = new List <string>();
            IGame game       = new Game(new OutputHandler(outputList), new NumberHandler(), new NumberProviderSequential(1, 100, 1));

            game.Go();

            var model = new FizzBuzzResponseModel();

            model.GameOutput = outputList;

            return(View(model));
        }