Battler.Battle.FightGeneralCounts C# (CSharp) Method

FightGeneralCounts() public method

public FightGeneralCounts ( ) : Task
return Task
        public async Task<BoutResult> FightGeneralCounts()
        {
            await Task.Delay(DELAY);

            var result = new BoutResult() { Category = "Statistics" };

            result.Results.Add(FightInt("Views", Fighter1.views, Fighter2.views));
            result.Results.Add(FightInt("Followers", Fighter1.follower_count, Fighter2.follower_count));
            result.Results.Add(FightInt("Following", Fighter1.following_count, Fighter2.following_count));
            result.Results.Add(FightInt("1 bit badges", Fighter1.one_bit_badges, Fighter2.one_bit_badges));
            result.Results.Add(FightInt("8 bit badges", Fighter1.eight_bit_badges, Fighter2.eight_bit_badges));
            result.Results.Add(FightInt("16 bit badges", Fighter1.sixteen_bit_badges, Fighter2.sixteen_bit_badges));
            result.Results.Add(FightInt("32 bit badges", Fighter1.thirty_two_bit_badges, Fighter2.thirty_two_bit_badges));
            result.Results.Add(FightInt("64 bit badges", Fighter1.sixty_four_bit_badges, Fighter2.sixty_four_bit_badges));

            result = CalculateWinner(result);

            return result;
        }

Usage Example

Example #1
0
        public async Task Start(string fighter1, string fighter2)
        {
            var battle = new Battle();

            await battle.Init(fighter1, fighter2);

            var boutResult = await battle.FightPersonal();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightGeneralCounts();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightLanguages();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightEnvironments();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightFrameworks();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightTools();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightInterests();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightTraits();
            Clients.Caller.boutComplete(boutResult);

            boutResult = await battle.FightAreas();
            Clients.Caller.boutComplete(boutResult);
        }