skizzle/src/main.cpp

27 lines
620 B
C++
Raw Normal View History

2016-03-25 17:40:39 +00:00
#include "player.hpp"
2016-03-10 20:58:30 +00:00
#include "block.hpp"
#include "manager.hpp"
2016-03-28 13:05:18 +00:00
#include "game.hpp"
#include "constants.hpp"
2016-03-25 17:40:39 +00:00
#include <cstdlib>
2016-03-10 20:58:30 +00:00
#include <iostream>
2016-03-28 17:57:55 +00:00
#include <memory>
2016-03-04 15:29:31 +00:00
int main() {
Manager manager;
2016-03-28 17:57:55 +00:00
std::shared_ptr<Game> game = std::shared_ptr<Game>(new Game);
2016-03-10 20:58:30 +00:00
2016-03-28 17:57:55 +00:00
manager.setView(game);
2016-03-10 20:58:30 +00:00
2016-03-25 17:40:39 +00:00
try {
manager.start();
2016-03-25 17:40:39 +00:00
} catch (const std::exception& exception) {
std::cerr << std::endl;
std::cerr << "Le programme a quitté après une erreur d'exécution." << std::endl;
std::cerr << exception.what() << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
2016-03-04 15:29:31 +00:00
}