public AiSetupDecision Setup()
 {
     if (GetConnectivity() > Math.PI)
     {
         return(futureIsNowSetupStrategy.Setup());
     }
     return(AiSetupDecision.Create(new Future[0], "connectivity is too low :-("));
 }
示例#2
0
 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));
        }
示例#4
0
        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());
        }
示例#7
0
 public AiSetupDecision Setup(State state, IServices services)
 {
     return(AiSetupDecision.Empty());
 }
示例#8
0
 public AiSetupDecision Setup()
 {
     return(AiSetupDecision.Empty());
 }