public void SetUp() { gridModel = Substitute.For <IAiGridModel>(); grid = new AiGridModelTile[15, 15]; gridModel.Grid.Returns(grid); board = Substitute.ForPartsOf <Board>(); candidate = new AiCandidate(); wordFinder = new AiGoWordFinder(gridModel, board); goWords = null; }
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; }
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; }
public AiGoWordFinder(IAiGridModel gridModel, Board board) { this.gridModel = gridModel; this.board = board; }