Example #1
0
        public Game()
        {
            GameBuilder builder = new GameBuilder();

            Cg = builder.CustomGameBuilder();

            Phases = builder.PhaseManagerBuilder();
            _loop  = builder.LoopBuilder(Phases);

            Chat = builder.ChatBuilder(Cg.Chat);

            //ISlotContentHistory slotContentHistory = builder.SlotContentHistoryBuilder();


            BotsModifiedFlag modifiedFlag = new BotsModifiedFlag();

            Slots = builder.SlotBuilder(Cg.AI, FilledSlotsFunc, modifiedFlag);

            Bots = builder.BotBuilder(Cg.AI, Slots, modifiedFlag);
            //Players = new PlayerManager(this);

            //Match = new MatchManager(this);


            //Logger = new MatchLogger(this);

            //Maps = new MapChooser(this, Map.A_HorizonLunarColony); //todolater get this from the user. Also need to load preset


            //Joins = new JoinManager(this);

            //Loop.AddPhaselessLoop(IncrementTime, 1);
        }
Example #2
0
 public GetWeatherHandler(IAviationWeatherRetriever aviationWeatherRetriever,
                          IAirportNameConverter airportNameConverter, ISlotManager slotManager)
 {
     _aviationWeatherRetriever = aviationWeatherRetriever;
     _airportNameConverter     = airportNameConverter;
     _slotManager = slotManager;
 }
Example #3
0
        public IBotManager BotBuilder(Deltin.CustomGameAutomation.AI ai, ISlotManager slots, BotsModifiedFlag modifiedFlag)
        {
            BotRequests   requests  = new BotRequests();
            IBotRequester requester = new BotRequester(requests);

            IBotExpectations      expectations      = new BotExpectations(requests, slots);
            IBotDeltinManipulator deltinManipulator = new BotDeltinManipulator(ai);

            IBotManipulation manipulation = new BotManipulation(slots, deltinManipulator, modifiedFlag);

            IBotCorruption corruption = new BotCorruption(slots.Bots, expectations);
            IBotRequestFulfillmentManager botRequestFulfillmentManager = new BotRequestFulfillmentManager(expectations, manipulation, corruption);

            IBotManager bots = new BotManager(requester, botRequestFulfillmentManager);

            return(bots);
        }
Example #4
0
 public AirportIdentifierHandler(IAirportNameConverter airportNameConverter, ISlotManager slotManager)
 {
     _airportNameConverter = airportNameConverter;
     _slotManager          = slotManager;
 }
Example #5
0
 bool IBotRule.FollowsRule(Team team, ISlotManager slots)
 {
     return(true);
 }
Example #6
0
 bool IBotRule.FollowsRule(Team team, ISlotManager slots)
 {
     return(slots.Players.TeamHasMore(team));
 }
Example #7
0
 bool IBotRule.FollowsRule(Team team, ISlotManager slots)
 {
     return(slots.Players.TeamsHaveEqualCount);
 }
Example #8
0
 internal BotExpectations(BotRequests botRequests, ISlotManager slots)
 {
     _botRequests = botRequests;
     _slots       = slots;
 }
        //public TournamentRegistrationController(IUnitOfWork unitOfWork, ITournamentRegistrationsManager tournamentRegistrationsManager, IBookingManager bookingManager, ISlotManager slotManager, ISecurityManager securityManager)
        //{
        //    this.unitOfWork = unitOfWork;
        //    this.tournamentRegistrationsManager = tournamentRegistrationsManager;
        //    this.bookingManager = bookingManager;
        //    userManager = UserManager;
        //    this.slotManager = slotManager;
        //    this.securityManager = securityManager;
        //}

        public TournamentRegistrationController(IUnitOfWork unitOfWork, ITournamentRegistrationsManager tournamentRegistrationsManager, IBookingManager bookingManager, DebRegUserManager userManager, ISlotManager slotManager, ISecurityManager securityManager)
        {
            this.unitOfWork = unitOfWork;
            this.tournamentRegistrationsManager = tournamentRegistrationsManager;
            this.bookingManager = bookingManager;
            this.slotManager = slotManager;
            this.securityManager = securityManager;

            this.userManager = userManager;
        }
Example #10
0
 public BotManipulation(ISlotManager slots, IBotDeltinManipulator deltin, BotsModifiedFlag modifiedFlag)
 {
     _slots  = slots;
     _deltin = deltin;
 }
Example #11
0
 public SlotController(ISlotManager manager)
 {
     _manager = manager;
 }
Example #12
0
        //public ActionResult SendAssignmentNotifications() {
        //    // Find currentTournament

        //    var ident = HttpContext.User.Identity as ClaimsIdentity;
        //    var currentTournamentId = claimsManager.GetCurrentTournamentId(ident);
        //    var user = userManager.FindById(ident.GetUserId());

        //    String paymentPageUrl = HttpContext.Request.Url.GetLeftPart(UriPartial.Authority) +
        //        Url.Action("Display", "TournamentRegistration", new {
        //            Area = "",
        //            tournamentId = "{0}",   // will be filled by slotManager
        //            organizationId = "{1}",  // will be filled by slotManager
        //            tab = "account",
        //        });
        //    paymentPageUrl = HttpContext.Server.UrlDecode(paymentPageUrl);
        //    slotManager.SendAssignmentNotifications(currentTournamentId, paymentPageUrl, user);
        //    return Redirect("Index");
        //}
        public SlotController(
            IUnitOfWork unitOfWork,
            ITournamentRegistrationsManager tournamentRegistrationsManager,
            ISlotAssignmentManager slotAssignmentManager,
            ISlotManager slotManager,
            IOrganizationManager organizationManager,
            ITournamentManager tournamentManager,
            DebRegUserManager userManager)
        {
            this.unitOfWork = unitOfWork;
            // this.claimsManager = claimsManager;
            this.tournamentRegistrationsManager = tournamentRegistrationsManager;
            this.slotAssignmentManager = slotAssignmentManager;
            this.slotManager = slotManager;
            this.organizationManager = organizationManager;
            this.tournamentManager = tournamentManager;
            this.userManager = userManager;
        }
Example #13
0
 public ReportController(ITournamentRegistrationsManager tournamentRegistrationsManager, ITournamentManager tournamentManager, ICountryManager countryManager, DebRegUserManager userManager, ISecurityManager securityManager, ISlotManager slotManager)
 {
     this.tournamentRegistrationsManager = tournamentRegistrationsManager;
     this.tournamentManager = tournamentManager;
     this.countryManager = countryManager;
     this.securityManager = securityManager;
     this.userManager = userManager;
     this.slotManager = slotManager;
 }