Exemplo n.º 1
0
 public AiGoHandler(
     IAiGridModel aiGridModel,
     WordFindable wordFinder,
     IAiGoWordFinder goWordFinder,
     WordValidatable wordValidator,
     IGoScorer goScorer,
     IAiGoPlacer goPlacer)
 {
     this.aiGridModel   = aiGridModel;
     this.goWordFinder  = goWordFinder;
     this.wordFinder    = wordFinder;
     this.wordValidator = wordValidator;
     this.goScorer      = goScorer;
     this.goPlacer      = goPlacer;
 }
Exemplo n.º 2
0
        public void SetUp()
        {
            game = new GameFactory(Substitute.For <IDateTimeOffset>()).NewGame("Player");
            game.Players[0].Tiles.Add(new Tile()
            {
                Letter = 'A'
            });

            aiGridModel = Substitute.For <IAiGridModel>();
            candidates  = new List <AiCandidate>();
            playerTiles = new List <Tile>();
            aiGridModel.Candidates.Returns(candidates);
            aiGridModel.PlayerTiles.Returns(playerTiles);

            wordFinder    = Substitute.For <WordFindable>();
            goWordFinder  = Substitute.For <IAiGoWordFinder>();
            wordValidator = Substitute.For <WordValidatable>();
            goScorer      = Substitute.For <IGoScorer>();
            goPlacer      = Substitute.For <IAiGoPlacer>();
            aiGoHandler   = new AiGoHandler(aiGridModel, wordFinder, goWordFinder, wordValidator, goScorer, goPlacer);

            goResult = null;
        }