2016-03-28 15:23:47 +00:00
|
|
|
#include "manager.hpp"
|
2016-04-03 20:08:11 +00:00
|
|
|
#include "editor.hpp"
|
2016-04-06 09:38:13 +00:00
|
|
|
#include "menu.hpp"
|
|
|
|
#include "game.hpp"
|
2016-03-10 20:58:30 +00:00
|
|
|
#include <iostream>
|
2016-03-28 17:57:55 +00:00
|
|
|
#include <memory>
|
2016-03-30 12:03:52 +00:00
|
|
|
#include <fstream>
|
2016-03-04 15:29:31 +00:00
|
|
|
|
|
|
|
int main() {
|
2016-03-28 15:23:47 +00:00
|
|
|
Manager manager;
|
2016-04-06 09:38:13 +00:00
|
|
|
std::shared_ptr<Menu> menu = std::shared_ptr<Menu>(new Menu(manager));
|
2016-04-03 20:08:11 +00:00
|
|
|
std::shared_ptr<Editor> editor = std::shared_ptr<Editor>(new Editor(manager));
|
2016-03-30 12:03:52 +00:00
|
|
|
|
2016-03-25 17:40:39 +00:00
|
|
|
try {
|
2016-04-09 13:53:12 +00:00
|
|
|
manager.setState(menu);
|
2016-03-28 15:23:47 +00:00
|
|
|
manager.start();
|
2016-03-25 17:40:39 +00:00
|
|
|
} catch (const std::exception& exception) {
|
|
|
|
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
|
|
|
}
|