public Engine(IGridCreator gridCreator, ITargetStrategy targetStrategy, IConfigService configService, ILogger <Engine> logger) { _gridCreator = gridCreator; _targetStrategy = targetStrategy; _configService = configService; _logger = logger; }
public Player(IGridCreator gridCreator, ITargetStrategy _targetStrategy, int gridSize, IEnumerable <ShipPrototype> ships, string playerName) { targetStrategy = _targetStrategy; PlayerGrid = gridCreator.Create(GridType.Main, gridSize, ships); OpponentGrid = gridCreator.Create(GridType.Opponent, gridSize); Name = playerName; }
protected Tower(Board board, int indexOnBoard) { instanceId = idGenerator++; this.board = board; this.indexOnBoard = indexOnBoard; stats = new TowerStats(); effects = new LinkedList<ITowerEffect>(); targetStrategy = new NearestMinionTargetStrategy(); }
public static IDictionary <string, string> Convert(ITargetStrategy strategy) { var result = new Dictionary <string, string>(); var types = strategy?.DetectedTypes; if (types != null) { var fakes = LoadFakesFiles(strategy?.FoundFakesConfiguration); var configuration = new Dictionary <string, XElement>(); foreach (var fakeType in types.Keys) { foreach (var type in types[fakeType]) { var assemblyName = type?.Assembly.GetName(); var baseName = assemblyName?.Name; if (string.IsNullOrWhiteSpace(baseName)) { continue; } if (!configuration.ContainsKey(baseName)) { XElement compilation = null; if (fakes.ContainsKey(baseName)) { compilation = fakes[baseName].Element(Compilation); } configuration[baseName] = CreateBaseFakeElement(baseName, AssemblyVersion(assemblyName), compilation); } var baseElement = configuration[baseName]; AddTypeToBaseElement(baseElement, type, fakeType); } } if (configuration.Count > 0) { result = configuration.ToDictionary(x => x.Key, y => y.Value.ToString()); } } return(result); }
public SingleFolder(string outputFolder, ITargetStrategy targetStrategy) { OutputFolder = outputFolder; TargetStrategy = targetStrategy; }
protected Tower() { stats = new TowerStats(); effects = new LinkedList<ITowerEffect>(); targetStrategy = new NearestMinionTargetStrategy(); }
public ChaseTargetStrategy(ITargetStrategy targetStrategy, ICreatureMovementStrategy movementStrategy) { this.targetStrategy = targetStrategy; this.movementStrategy = movementStrategy; }
protected Tower() { stats = new TowerStats(); effects = new LinkedList <ITowerEffect>(); targetStrategy = new NearestMinionTargetStrategy(); }