public DifficultyLevelChooser(IInputReader reader, GameMessageWriter writer, LevelChecker levelChecker) { this._reader = reader; this._writer = writer; this._levelChecker = levelChecker; }
public GamePlayer(IInputReader reader, GameMessageWriter writer, RandomNumberSelector randomNumberSelector, UserNameRetriever userNameRetriever, DifficultyLevelChooser difficultyLevelChooser) { this._reader = reader; this._writer = writer; this._randomNumberSelector = randomNumberSelector; this._userNameRetriever = userNameRetriever; this._difficultyLevelChooser = difficultyLevelChooser; }
public GamePlayer createGamePlayer() { IInputReader reader = new UserInputReader(); NameChecker nameChecker = new NameChecker(); LevelChecker levelChecker = new LevelChecker(); ResponseWriter responseWriter = new ResponseWriter(); GameMessageWriter writer = new GameMessageWriter(responseWriter); DifficultyLevelChooser difficultyLevelChooser = new DifficultyLevelChooser(reader, writer, levelChecker); RandomNumberSelector randomNumberSelector = new RandomNumberSelector(); UserNameRetriever userNameRetriever = new UserNameRetriever(reader, writer, nameChecker); GamePlayer gamePlayer = new GamePlayer(reader, writer, randomNumberSelector, userNameRetriever, difficultyLevelChooser); return(gamePlayer); }