protected bool Equals(Champion other)
 {
     return(GameDefinitionId == other.GameDefinitionId &&
            PlayerId == other.PlayerId &&
            WinPercentage.Equals(other.WinPercentage) &&
            NumberOfWins == other.NumberOfWins &&
            NumberOfGames == other.NumberOfGames);
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = GameDefinitionId;
         hashCode = (hashCode * 397) ^ PlayerId;
         hashCode = (hashCode * 397) ^ WinPercentage.GetHashCode();
         hashCode = (hashCode * 397) ^ NumberOfWins;
         hashCode = (hashCode * 397) ^ NumberOfGames;
         return(hashCode);
     }
 }
Exemple #3
0
        public new string ToString()
        {
            PositionString message = "";

            message.Position(13, "| " + User.Username.ToUpper());
            message.Section(15, "Pelejä: " + Played);
            message.Section(17, "Voittoja: " + Won);
            message.Section(11, WinPercentage.ToFixed() + "%");
            message.Section(18, "Unohtunut: " + Forfeitted);
            message.Section(11, ForfeitPercentage.ToFixed() + "%");
            if (SeasonsWon.HasValue)
            {
                message.Section(22, "Voitetut kaudet: " + SeasonsWon);
            }
            if (SeasonsLost.HasValue)
            {
                message.Section(21, "Hävityt kaudet: " + SeasonsLost);
            }
            message.Section(25, "Voitot: " + addSplitsToInt(Total, 3));
            message.Section(5, "");
            return(message);
        }
Exemple #4
0
 public override void FillCongressVotingArguments(CongressVoting voting)
 {
     voting.Argument1 = WinPercentage.ToString();
 }
        public BasePlayer MostWinningPlayer(List <WinPercentage> winList)
        {
            WinPercentage mostWinning = winList.Find(p => p.WPercentage == winList.Max(p => p.WPercentage));

            return(mostWinning.Player);
        }