Exemplo n.º 1
0
        public int GetPtsEarned(Team team)
        {
            int score = 0;

            if (NegsByTeam.Contains(team))
            {
                score += metadata.NegWeight ?? 0;
            }

            if (AnsweredByTeam == team)
            {
                score += TossupResult == Game.TossupResult.POWER
                    ? (metadata.PowerWeight ?? metadata.TossupWeight)
                    : metadata.TossupWeight;

                foreach (var bonusResult in BonusResults)
                {
                    score += bonusResult == BonusResult.ANSWERED ? metadata.BonusWeight : 0;
                }
            }
            else
            {
                foreach (var bonusResult in BonusResults)
                {
                    score += bonusResult == BonusResult.BOUNCE_BACK ? metadata.BonusWeight : 0;
                }
            }

            return(score);
        }
Exemplo n.º 2
0
 public void AwardNeg(Player player)
 {
     NegsByPlayer.Add(player);
     NegsByTeam.Add(player.Team);
 }