sliding-puzzle/main.cpp

22 lines
424 B
C++

#include "application.h"
#include "argsprocessor.h"
int main(int argc, char **argv)
{
ArgsProcessor args(argc, argv);
if (args.broken())
return EXIT_FAILURE;
const auto&[splitting, resolution, path] = args.unpack();
Application app(resolution.x, resolution.y);
if (app.init(path, splitting))
{
app.run();
return EXIT_SUCCESS;
}
else
return EXIT_FAILURE;
}