예제 #1
0
 protected override int CalculateScore()
 {
     if (IsSpare())
     {
         return(SpareBasePunctuation + ThirdRoll.Value());
     }
     return(FirstRoll.Value() + SecondRoll.Value() + ThirdRoll.Value());
 }
예제 #2
0
 protected virtual int CalculateScore()
 {
     if (IsStrike())
     {
         return(StrikeBasePunctuation + TwoNextRollsPins());
     }
     if (IsSpare())
     {
         return(SpareBasePunctuation + NextRollPins());
     }
     return(FirstRoll.Value() + SecondRoll.Value());
 }