public AiSetupDecision Setup() { if (GetConnectivity() > Math.PI) { return(futureIsNowSetupStrategy.Setup()); } return(AiSetupDecision.Create(new Future[0], "connectivity is too low :-(")); }
public AiSetupDecision Setup(State state, IServices services) { services.Setup <Graph>(); Enumerable.Range(0, state.punters) .Select(punterId => StrategyProvider(state, services)) .Consume(); return(AiSetupDecision.Empty()); }
public AiSetupDecision Setup() { var graphDiameterEstimation = (int)Math.Round(pathMultiplier * Math.Sqrt(state.map.Sites.Length)); var length = graphDiameterEstimation; var path = new PathSelector(state.map, mineDistCalculator, length).SelectPath(); var futures = new FuturesPositioner(state.map, graph, path, mineDistCalculator).GetFutures(); return(AiSetupDecision.Create(futures)); }
public AiSetupDecision Setup(State state, IServices services) { var strategy = StrategyProvider(state, services); var setupStrategy = strategy as ISetupStrategy; var decision = setupStrategy?.Setup(); if (!state.settings.futures) { return(AiSetupDecision.Empty()); } return(decision ?? AiSetupDecision.Empty()); }
public AiSetupDecision Setup() { var meetingPoint = meetingPointService.MeetingPoint; var futures = new List <Future>(); foreach (var mine in graph.Mines.Keys) { futures.Add(new Future(mine, meetingPoint)); } futures = futures.Where(f => f.source != f.target).ToList(); return(AiSetupDecision.Create(futures.ToArray(), $"meet in {meetingPoint}")); }
public AiSetupDecision Setup(State state, IServices services) { foreach (var strategyProvider in StrategyProviders) { strategyProvider(state, services); } var setupDecision = SetupStrategyProvider?.Invoke(state, services)?.Setup(); if (!state.settings.futures) { return(AiSetupDecision.Empty()); } return(setupDecision ?? AiSetupDecision.Empty()); }
public AiSetupDecision Setup(State state, IServices services) { return(AiSetupDecision.Empty()); }
public AiSetupDecision Setup() { return(AiSetupDecision.Empty()); }