public void No_score_for_frame_11() { var sut = new Scorer(); var result = sut.Calc_frame_scores(new[] { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }); Assert.AreEqual(11, result.Count()); Assert.AreEqual(0, result.Last()); }
public void Calc_total_score() { var frames = new[] { new Frame{Score=1}, new Frame{Score=2}, new Frame{} }; var sut = new Scorer(); var result = sut.Calc_total_score(frames); Assert.AreEqual(3, result); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var ui = new UI(); var frames = new Frames(); var scorer = new Scorer(); var map = new Mappings(); var integration = new Integration(frames, scorer); ui.On_Clear += integration.New_game; ui.On_Pins += integration.Register_roll; integration.Result += map.Map; map.Result += ui.Display; integration.Start(); Application.Run(ui); }
public Integration(Frames frames, Scorer scorer) { _frames = frames; _scorer = scorer; }