Print formated output with the frames and rolls now works
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user