public SolverTests(ITestOutputHelper output) { var feedback = new XUnitFeedback(output); var boardFactory = new BoardFactory(feedback); testingPrinter = new XunitBoardPrinter(output); strategy = new ExcludeStrategy(new ConsoleFeedback(), new XunitBoardPrinter(output)); solver = new Solver(boardFactory, strategy, feedback); }
public GameManager( IBoardPrinter boardPrinter, IBoardManager boardManager, IBoardGenerator boardGenerator, IActionParser actionParser, IScoreManager scoreManager, User.User user) { _boardPrinter = boardPrinter; _boardManager = boardManager; _boardGenerator = boardGenerator; _actionParser = actionParser; _scoreManager = scoreManager; _user = user; _menuOptions = new StringBuilder() .AppendLine("--------------------------") .AppendLine("SELECT AN OPTION:") .AppendLine("S X Y - Select a cell in the x,y position") .AppendLine("F X Y - Flag a cell in the x,y position") .AppendLine("E - Exit the game") .AppendLine() .ToString(); }
public ExcludeStrategy(IFeedback feedback, IBoardPrinter boardPrinter) { this.feedback = feedback; this.boardPrinter = boardPrinter; }
public Game(IBoardPrinter printer, IDice dice) { this.printer = printer; this.dice = dice; }