Print formated output with the frames and rolls now works

This commit is contained in:
2025-03-18 20:00:59 +01:00
parent e54b191f7a
commit 959a55d4d0
5 changed files with 145 additions and 7 deletions
+1 -1
View File
@@ -4,11 +4,11 @@ ScoreCalculator::ScoreCalculator() {};
ScoreCalculator::~ScoreCalculator() {};
int ScoreCalculator::GetScore(vector<int> rolls) {
// Calculate score
int score = 0;
int frame = 0;
while (true) {
// Strike
if (rolls[frame] == 10) {
// If we're on our last frame, and roll a 10.
if (frame + 3 == rolls.size() && rolls[frame - 3] == 10) {