1 #ifndef BOARDPARSER_H_DEFINED 2 #define BOARDPARSER_H_DEFINED 4 #include <Game/Board.hpp> 24 #define COMMENT_CHAR ';' 26 #define SNAKE_CHAR '@' 56 static Board* load(std::string filename);
63 static Board* loadFile(std::string filename);
66 static bool save(
Board* board, std::string filename);
73 static std::vector<std::string> listLevels();
76 #endif //BOARDPARSER_H_DEFINED Opens, loads and parses a level file, returning a well-formed Board.
static std::string directory
Default directory where the level files are.
A level where the snake runs and eats fruits.
static std::string extension
Default extension for nSnake level files.
Custom exception class to specify an error that occurred during a level loading.