Beispiel #1
0
        public RapperTinder(List <RapperSwearStats> rappers, Song unknownSong)
        {
            this.rappers     = rappers;
            this.unknownSong = unknownSong;
            scores           = new Dictionary <string, int>();

            unknownSongSwearStats = new SwearStats();
            unknownSongSwearStats.AddSwearsFrom(unknownSong);
        }
Beispiel #2
0
        public int FindCommonSwearsScore(ref SwearStats otherSwearStats)
        {
            int score = 0;

            foreach (var swear in this.allSwears)
            {
                if (otherSwearStats.allSwears.ContainsKey(swear.Key))
                {
                    score++;
                }
            }

            return(score);
        }