nsnake
Classic snake game for the terminal
|
Opens, loads and parses a level file, returning a well-formed Board
.
More...
#include <BoardParser.hpp>
Static Public Member Functions | |
static Board * | load (std::string filename) |
Loads and parses level with name. More... | |
static Board * | loadFile (std::string filename) |
Loads and parses the level at filename. More... | |
static bool | save (Board *board, std::string filename) |
TODO. | |
static std::vector< std::string > | listLevels () |
Lists all levels found by the game. More... | |
Static Public Attributes | |
static std::string | directory = "" |
Default directory where the level files are. More... | |
static std::string | extension = "nsnake" |
Default extension for nSnake level files. More... | |
Opens, loads and parses a level file, returning a well-formed Board
.
Definition at line 31 of file BoardParser.hpp.
|
static |
Lists all levels found by the game.
It looks on standard level locations. Whatever that might mean.
Definition at line 170 of file BoardParser.cpp.
|
static |
Loads and parses level with name.
Definition at line 18 of file BoardParser.cpp.
|
static |
Loads and parses the level at filename.
Board
if successful, NULL if failed. Definition at line 28 of file BoardParser.cpp.
|
static |
Default directory where the level files are.
Globals::Config::directory + levels/
, which at the time of writing is ~/.local/share/nsnake/levels
Definition at line 38 of file BoardParser.hpp.
|
static |
Default extension for nSnake level files.
It's all the part that comes after the dot on a file name.
Definition at line 47 of file BoardParser.hpp.