public MastermindGame(Mastermind codeChecker, CodeRandomiser codeRandomiser, UIWriter uiWriter, InputCleanser inputCleanser) { _mastermind = codeChecker; _uiWriter = uiWriter; _inputCleanser = inputCleanser; _codeRandomiser = codeRandomiser; }
static void Main(string[] args) { var codeChecker = new Mastermind(new GuessValidator()); var inputCleanser = new InputCleanser(); var uiWriter = new UIWriter(); var codeRandomiser = new CodeRandomiser(); var mastermindGame = new MastermindGame(codeChecker, codeRandomiser, uiWriter, inputCleanser); mastermindGame.Run(); }