#include #include #include #include int main(int argc, char** argv) { int window_width = 500; int window_height = 500; const char* help = " -w Set the width of the window, default 500\n" " -h Set the height of the window, default 500\n"; int opt; while ((opt = getopt(argc, argv, "w:h:")) != -1) { switch (opt) { case 'w': /* Set the window width */ window_width = atoi(optarg); break; case 'h': /* Set the window height */ window_height = atoi(optarg); break; default: fprintf(stderr, "Unknown argument '%s'\n%s", argv[optind], help); exit(1); } } game_start(window_width, window_height); return 0; }