28 lines
663 B
C++
28 lines
663 B
C++
#ifndef NUMBERHELPER_H
|
|
#define NUMBERHELPER_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "../include/Frame.h"
|
|
|
|
using namespace std;
|
|
|
|
class NumberHelper {
|
|
public:
|
|
NumberHelper() = default;
|
|
|
|
~NumberHelper() = default;
|
|
|
|
static vector<int> getRolls(string csv);
|
|
static bool validateRolls(vector<int> rolls);
|
|
static vector<Frame> createFrames(vector<int> rolls);
|
|
|
|
private:
|
|
static Frame createStrikeFrame(int i);
|
|
static Frame createFreeFrame(int i, int j);
|
|
static Frame createBonusFrame(int i, int j, int k);
|
|
static bool isNumber(const std::string& str);
|
|
};
|
|
|
|
|
|
#endif |