1#include <Config/Arguments.hpp>
3#include <commander/commander.h>
15 "nsnake v" VERSION
" (" DATE
")\n"
18 " / \\ This game was made with\n"
19 " ((__-^^-,-^^-__)) and itself is Free Software,\n"
20 " `-_---' `---_-' licensed under the GPLv3\n"
27 "Homepage: http://nsnake.alexdantas.net/\n"
28 "Source Code: https://github.com/alexdantas/nsnake/\n"
29 "Contact: Alexandre Dantas <eu@alexdantas.net>\n";
34void help(command_t* self)
39 " _ __ _ __ _ ____ \n"
40 "| |\\ | ( (` | |\\ | / /\\ | |_/ | |_ \n"
41 "|_| \\| _)_) |_| \\| /_/--\\ |_| \\ |_|__ \n"
42 "v" VERSION
" (built " DATE
")\n"
44 "nsnake is the classical snake game on the terminal\n"
46 "Settings and scores are stored at:\n"
47 " `~/.local/share/nsnake/`\n"
52 " -h, --help Show this message\n"
53 " -v, --version Show game version and contact info\n"
55 "See also `man nsnake`\n"
56 "Thanks for playing this game :)\n";
62void Arguments::parse(
int argc,
char* argv[])
66 command_init(&cmd, argv[0], VERSION);
68 command_option(&cmd,
"-v",
"--version",
"Show game version and build date", version);
69 command_option(&cmd,
"-h",
"--help",
"Show instructions", help);
71 command_parse(&cmd, argc, argv);
char version[3]
Game version (format MMP - Major Minor Patch).
void exit()
Warns the user about any errors and warnings found during the program's execution.