snakeplusplus/src/main.cpp

22 lines
576 B
C++
Raw Normal View History

#include "gamestate.hpp"
#include <memory>
#include <string>
#include <vector>
#include <iostream>
int main(int argc, char* argv[])
{
std::vector<std::string> args{argv + 1, argv + argc};
for (auto it = args.begin(); it != args.end(); it++) {
if (it->compare("--no-gui") == 0) {
g_pEngine->state.m_bNoDisplay = true;
} else {
std::cerr << "[ERROR] Argument option not found, exiting..." << std::endl;
return 1;
}
}
g_pEngine = std::make_unique<GameEngine>();
g_pEngine->Start();
return 0;
}