sliding-puzzle/main.cpp

22 lines
424 B
C++
Raw Normal View History

2020-12-14 14:22:52 -05:00
#include "application.h"
2021-03-25 08:27:50 -04:00
#include "argsprocessor.h"
2020-12-18 15:12:28 -05:00
int main(int argc, char **argv)
2020-12-13 13:45:52 -05:00
{
2021-03-25 08:27:50 -04:00
ArgsProcessor args(argc, argv);
2021-03-25 08:27:50 -04:00
if (args.broken())
return EXIT_FAILURE;
const auto&[splitting, resolution, path] = args.unpack();
2020-12-20 08:49:24 -05:00
Application app(resolution.x, resolution.y);
2020-12-18 15:12:28 -05:00
if (app.init(path, splitting))
{
app.run();
return EXIT_SUCCESS;
}
2021-03-25 08:27:50 -04:00
else
return EXIT_FAILURE;
2020-12-13 13:45:52 -05:00
}