Example #1
0
        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);
        }
Example #2
0
        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();
        }
Example #3
0
 public ExcludeStrategy(IFeedback feedback, IBoardPrinter boardPrinter)
 {
     this.feedback     = feedback;
     this.boardPrinter = boardPrinter;
 }
Example #4
0
 public Game(IBoardPrinter printer, IDice dice)
 {
     this.printer = printer;
     this.dice    = dice;
 }