private static GameInitializer BuildGameInitializer(IPlayersFactory playersFactory = null, IPatternFactory patternFactory = null, IIntelligenceFactory aiFactory = null) { var io = new MockInputOutput(); playersFactory = playersFactory ?? new PlayersFactory(new HumanIntelligence(io)); patternFactory = patternFactory ?? new PatternFactory(); aiFactory = aiFactory ?? new IntelligenceFactory(io); return(new GameInitializer(playersFactory, patternFactory, aiFactory)); }
private static GameInitializer BuildGameInitializer(IPlayersFactory playersFactory = null, IPatternFactory patternFactory = null, IIntelligenceFactory aiFactory = null) { var player1 = new MockPlayer(); var player2 = new MockPlayer(); playersFactory = playersFactory ?? new MockPlayersFactory().CreateStubbedToReturn(new List <IPlayer> { player1, player2 });; patternFactory = patternFactory ?? new MockPatternFactory(); aiFactory = aiFactory ?? new MockIntelligenceFactory(); return(new GameInitializer(playersFactory, patternFactory, aiFactory)); }
public GameInitializer(IPlayersFactory playersFactory, IPatternFactory patternFactory, IIntelligenceFactory aiFactory) { _playersFactory = playersFactory; _patternFactory = patternFactory; _aiFactory = aiFactory; }