Validate if there are more or less than the allowed rolls, if the numbers are valid and if the number isn't a number.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef FILEUTIL_H
|
||||
#define FILEUTIL_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class FileUtil {
|
||||
public:
|
||||
FileUtil() = default;
|
||||
|
||||
~FileUtil() = default;
|
||||
|
||||
static string getFile(char *path);
|
||||
static bool fileExists(char *path);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -18,9 +18,10 @@ class NumberHelper {
|
||||
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 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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user