public bool TryMatch(IDictionary <Guid, IList <MediaItemAspect> > extractedAspects, IDictionary <Guid, IList <MediaItemAspect> > existingAspects)
        {
            if (!existingAspects.ContainsKey(CharacterAspect.ASPECT_ID))
            {
                return(false);
            }

            CharacterInfo linkedCharacter = new CharacterInfo();

            if (!linkedCharacter.FromMetadata(extractedAspects))
            {
                return(false);
            }

            CharacterInfo existingCharacter = new CharacterInfo();

            if (!existingCharacter.FromMetadata(existingAspects))
            {
                return(false);
            }

            return(linkedCharacter.Equals(existingCharacter));
        }
Exemple #2
0
 void OnRoundEnds(CharacterInfo winner, CharacterInfo loser)
 {
     // Fires when a round ends
     // TODO add round counter to show how many rounds a player has won
     if (winner.Equals(this.player1)){
         player1Rounds ++;
     }else{
         player2Rounds ++;
     }
 }