Skip to content

Commit 0ce1e0a

Browse files
committed
one more test pass
1 parent 6137b52 commit 0ce1e0a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/bowling/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ impl BowlingGame {
103103
let next_next_frame = self.frames.get(frame_index+2);
104104
if next_next_frame.is_some() {
105105
return (Some(next_frame.unwrap().roll1), Some(next_next_frame.unwrap().roll1))
106+
} else {
107+
return (Some(next_frame.unwrap().roll1), self.fill_ball1)
106108
}
107-
return (Some(next_frame.unwrap().roll1), Some(0))
108109
}
109110
return (Some(next_frame.unwrap().roll1), Some(next_frame.unwrap().roll2))
110111
}

rust/bowling/tests/bowling.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ fn a_strike_with_the_one_roll_bonus_after_a_spare_in_the_last_frame_does_not_get
246246
}
247247

248248
#[test]
249-
#[ignore]
250249
fn all_strikes_is_a_perfect_score_of_300() {
251250
let mut game = BowlingGame::new();
252251

0 commit comments

Comments
 (0)