コード例 #1
0
 public void It_Should_Be_Able_To_Manage_A_Bonus_Ball(int ballOne, int ballTwo, int ballThree)
 {
     _frame.SetBallOne(ballOne);
     _frame.SetBallTwo(ballTwo);
     Assert.AreEqual(FrameStatus.InProgress, _frame.GetStatus());
     _frame.SetBallThree(ballThree);
     Assert.AreEqual(FrameStatus.Over, _frame.GetStatus());
 }
コード例 #2
0
 private static void SetScoreLastFrame(IList <int?> score, ILastFrame lastFrame)
 {
     lastFrame.SetBallOne(score[0] == null ? 0 : (int)score[0]);
     lastFrame.SetBallTwo(score[1] == null ? 0 : (int)score[1]);
     lastFrame.SetBallThree(score[2] == null ? 0 : (int)score[2]);
 }