示例#1
0
        protected override ReadonlyEvent GatherData()
        {
            if (ScoreCanIncrease(currentPlayer))
            {
                Result.Deltas.Add(new Delta {
                    Actor = currentPlayer, Key = "Score", Value = ScoreAmount.ToString(), Targets = repo.Get(Result)
                });
                Result.Actor      = currentPlayer;
                Result.Targets    = ValidScoreTargets;
                Result.Resolution = EventResolutionType.Commit;
            }

            return(this);
        }
 public ScoreAmountRepresentation(ScoreAmount scoreAmount)
 {
     ScoreAmount  = scoreAmount;
     AmountString = scoreAmount.ToString();
     if (scoreAmount.IsGeneral)
     {
         AmountString = scoreAmount.Amount.ToString();
     }
     else if (scoreAmount.IsMatch)
     {
         AmountString = scoreAmount.Amount.ToString();
     }
     AmountColor = scoreAmount.IsGeneral
         ? "DarkRed"
         : scoreAmount.IsMatch
             ? "Orange"
             : "Black";
 }