Пример #1
0
        static void Main(string[] args)
        {
            IOperationWithData operationWithData = new OperationWithArrays();
            ISettingsProvider  settingsProvider  = new SettingsProvider();
            IPhraseProvider    phraseProvider    = new JsonPhraseProvider(settingsProvider);
            IInputOutput       inputOutput       = new ConsoleInputOutput(phraseProvider);
            IArrayGenerator    arrayGenerator    = new DoorsNumbersGenerator(settingsProvider, operationWithData);

            Game game = new Game(phraseProvider, inputOutput, settingsProvider, arrayGenerator, operationWithData);

            game.Run();
        }
Пример #2
0
 public DoorsNumbersGenerator(ISettingsProvider settingsProvider, IOperationWithData operationWithData)
 {
     this.gameSettings = settingsProvider.GetGameSettings();
     this.operationWithArrays = (OperationWithArrays) operationWithData;
 }