Skip to content

Commit

Permalink
Fix: Do not show next game button automatically after strike in 10th (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
autoreleasefool authored Nov 2, 2023
1 parent 110c9b8 commit 57306c3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ extension Frame.Edit {

public var firstUntouchedRoll: Int? {
guard rolls.count < Frame.NUMBER_OF_ROLLS else { return nil }
return deck(forRoll: rolls.endIndex - 1).arePinsCleared ? nil : rolls.endIndex
if Frame.isLast(index) {
return rolls.endIndex
} else {
return deck(forRoll: rolls.endIndex - 1).arePinsCleared ? nil : rolls.endIndex
}
}

public mutating func setBowlingBall(_ bowlingBall: Gear.Summary?, forRoll rollIndex: Int) {
Expand Down

0 comments on commit 57306c3

Please sign in to comment.