public void Frame2RollsKnockDown10PinsIsStrikeOk() { Frame frame = new Frame(); frame.Roll(10); Assert.AreEqual(true, frame.IsStrike); }
public void Frame2RollsKnockDown4Plus3PinsScore7() { Frame frame = new Frame(); frame.Roll(4); frame.Roll(3); Assert.AreEqual(7, frame.Score); }
public void Frame2RollsKnockDown4Plus3PinsIsStrikeNok() { Frame frame = new Frame(); frame.Roll(4); frame.Roll(3); Assert.AreEqual(false, frame.IsStrike); }
public void Frame2RollsKnockDown4Plus3PinsFinishOK() { Frame frame = new Frame(); frame.Roll(4); frame.Roll(3); Assert.AreEqual(true, frame.IsFinish); }
public void Frame2RollsKnockDown0Plus10PinsSpareOK() { Frame frame = new Frame(); frame.Roll(0); frame.Roll(10); Assert.AreEqual(true, frame.IsSpare); }
public void Frame2RollsKnockDown0Plus10PinsFinishOk() { Frame frame = new Frame(); frame.Roll(0); frame.Roll(10); Assert.AreEqual(true, frame.IsFinish); }
public void Frame2RollsKnockDown0Plus10PinsSCore0() { Frame frame = new Frame(); frame.Roll(0); frame.Roll(10); Assert.AreEqual(0, frame.Score); }
public void Roll(int nbPins) { if (currentFrame == null) currentFrame = new Frame(); currentFrame.Roll(nbPins); if (listFrame.Count > 0 && (listFrame[listFrame.Count - 1].IsSpare || listFrame[listFrame.Count - 1].IsStrike)) listFrame[listFrame.Count - 1].AddBonus(nbPins); if (listFrame.Count > 1 && listFrame[listFrame.Count - 2].IsStrike) listFrame[listFrame.Count - 2].AddBonus(nbPins); if (currentFrame.IsFinish) { listFrame.Add(currentFrame); currentFrame = null; } }
public void FrameOneRollKnockDown4PinsSpareNOK() { Frame frame = new Frame(); frame.Roll(4); Assert.AreEqual(false, frame.IsSpare); }
public void FrameOneRollKnockDown4PinsScore0() { Frame frame = new Frame(); frame.Roll(4); Assert.AreEqual(0, frame.Score); }
public void FrameOneRollKnockDown4PinsFinishNok() { Frame frame = new Frame(); frame.Roll(4); Assert.AreEqual(false, frame.IsFinish); }
public void Frame2RollsKnockDown4Plus6PinsSpareOK() { Frame frame = new Frame(); frame.Roll(4); frame.Roll(6); Assert.AreEqual(true, frame.IsSpare); }
public void Frame2RollsKnockDown4Plus6PinsScore0() { Frame frame = new Frame(); frame.Roll(4); frame.Roll(6); Assert.AreEqual(0, frame.Score); }