Example #1
0
        public override void Initialize()
        {
            IScoreBoard scoreBoard = new ScoreBoard();
            IScoreBoardService scoreBoardService = new ScoreBoardService(scoreBoard);
            IRenderer renderer = new ConsoleRenderer(new CapitalizeFormatter(), new Writer());
            IInputProvider inputProvider = new ConsoleInputProvider(new Reader());
            IPlayer player = new Player();
            IWordProvider wordProvider = new WordProvider();
            IWordGenerator randomWordGenerator = new WordGenerator(wordProvider);
            ICommandFactory commandFactory = new CommandFactory();
            IEngine gameEngine = new ConsoleEngine(scoreBoardService, renderer, player, randomWordGenerator, commandFactory, inputProvider);

            this.Engine = gameEngine;
        }
Example #2
0
        public override void Initialize()
        {
            base.Initialize();

            IScoreBoard scoreBoard = new ScoreBoard();
            IScoreBoardService scoreBoardService = new ScoreBoardService(scoreBoard);
            IRenderer renderer = new WpfRenderer(new AllCapsFormatter(), new WpfWriter());
            IPlayer player = new Player();
            IWordProvider wordProvider = new WordProvider();
            IWordGenerator randomWordGenerator = new WordGenerator(wordProvider);
            ICommandFactory commandFactory = new CommandFactory();
            IEngine gameEngine = new WpfEngine(scoreBoardService, renderer, player, randomWordGenerator, commandFactory);

            this.Engine = gameEngine;
        }
 public void Init()
 {
     this.scoreBoard = new ScoreBoard();
     this.scoreBoardService = new ScoreBoardService(this.scoreBoard);
 }
 public void CleanUp()
 {
     this.scoreBoard = null;
     this.scoreBoardService = null;
 }