Пример #1
0
        public ConsoleUI(GameFlow gameFlow, IConsoleIO console, IStorage storage, RulesEngine rulesEngine)
        {
            CheckArg.NotNull(gameFlow);
            CheckArg.NotNull(console);
            CheckArg.NotNull(storage);
            CheckArg.NotNull(rulesEngine);

            GameCmdHandler = new GameCmdHandler(gameFlow, storage, console);
            TurnCmdHandler = new TurnCmdHandler(rulesEngine);
            BoardPrinter   = new BoardPrinter(console, gameFlow);
            CommandParser  = new CommandParser();
            CommandCycle   = new CommandCycle(console, GameCmdHandler, TurnCmdHandler, BoardPrinter, CommandParser);
        }