本文整理汇总了C#中Frame.Roll方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.Roll方法的具体用法?C# Frame.Roll怎么用?C# Frame.Roll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame.Roll方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: spare_should_close_frame
public void spare_should_close_frame()
{
var frame = new Frame();
frame.Roll('1');
frame.Roll('/');
Assert.AreEqual(false, frame.IsOpen);
}
示例2: spare_should_leave_frame_open_for_scoring
public void spare_should_leave_frame_open_for_scoring()
{
var frame = new Frame();
frame.Roll('1');
frame.Roll('/');
Assert.AreEqual(true, frame.StillScoring);
}
示例3: Frame_total_should_sum_rolls
public void Frame_total_should_sum_rolls()
{
var frame = new Frame();
frame.Roll('1');
frame.Roll('1');
Assert.AreEqual(2, frame.Score);
}
示例4: ball_after_strike_should_leave_frame_open_for_scoring
public void ball_after_strike_should_leave_frame_open_for_scoring()
{
var frame = new Frame();
frame.Roll('X');
frame.Roll('1');
Assert.AreEqual(true, frame.StillScoring);
}
示例5: spare_should_sum_one_extra_ball
public void spare_should_sum_one_extra_ball()
{
var frame = new Frame();
frame.Roll('1');
frame.Roll('/');
frame.Roll('1');
Assert.AreEqual(11, frame.Score);
}
示例6: spare_should_close_for_scoring_after_one_ball
public void spare_should_close_for_scoring_after_one_ball()
{
var frame = new Frame();
frame.Roll('1');
frame.Roll('/');
frame.Roll('1');
Assert.AreEqual(false, frame.StillScoring);
}
示例7: strike_should_sum_two_extra_balls
public void strike_should_sum_two_extra_balls()
{
var frame = new Frame();
frame.Roll('X');
frame.Roll('1');
frame.Roll('1');
Assert.AreEqual(12, frame.Score);
}
示例8: two_balls_after_strike_should_sum_2
public void two_balls_after_strike_should_sum_2()
{
var frame = new Frame();
frame.Roll('X');
frame.Roll('X');
frame.Roll('X');
Assert.AreEqual(30, frame.Score);
}
示例9: two_balls_after_strike_should_close_frame_for_scoring
public void two_balls_after_strike_should_close_frame_for_scoring()
{
var frame = new Frame();
frame.Roll('X');
frame.Roll('1');
frame.Roll('1');
Assert.AreEqual(false, frame.StillScoring);
}