Example #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            MlService crawler = new MlService();

            crawler.getCarro(txtSearchInput.Text);
            //crawler.GetCotacaoMoedas();
        }
Example #2
0
        protected override async Task <SoldierType> FindSoldierTypeAsync(MainRepository repo, Town nextBattleTown)
        {
            if (this.soldierTypeCache == SoldierType.Unknown)
            {
                var soldierTypeNumber = this.Character.Id + this.GameDateTime.Year / 14;

                if (this.Town.Technology >= 500 &&
                    this.Character.Money > this.Character.Leadership * 300 + 5_0000 &&
                    (this.AttackType == AttackMode.BreakWall ||
                     this.AttackType == AttackMode.GetTown ||
                     (nextBattleTown != null &&
                      nextBattleTown.Wall > 200 &&
                      MlService.Predict(await repo.AiActionHistory.GetAsync(this.Country.Id, this.Town.Id, this.Town.CountryId), new AiBattleHistory
                {
                    CharacterId = this.Character.Id,
                    CountryId = this.Character.CountryId,
                    IntGameDateTime = this.GameDateTime.ToInt() + 1,
                    TownId = this.NextBattleTown.Id,
                    TownCountryId = this.NextBattleTown.CountryId,
                }) == AiBattleTargetType.Wall)))
                {
                    this.soldierTypeCache = SoldierType.StoneSlingshot;
                }
                else if (this.Town.Technology >= 1000 && this.Character.Money > this.Character.Leadership * 240 + 45_0000 && this.GameDateTime.Year >= 108)
                {
                    if (soldierTypeNumber % 3 == 0)
                    {
                        this.soldierTypeCache = SoldierType.RepeatingCrossbow;
                    }
                    else if (soldierTypeNumber % 3 == 1)
                    {
                        this.soldierTypeCache = SoldierType.Chariot;
                    }
                    else
                    {
                        this.soldierTypeCache = SoldierType.Seishu;
                    }
                }
Example #3
0
 public ValuesController(IUnitOfWork unitOfWork, MlService mlService)
 {
     this.unitOfWork = unitOfWork;
     this._MlService = mlService;
 }