31 lines
569 B
C++
31 lines
569 B
C++
#include <SFML/Graphics.hpp>
|
|
#include <SFML/Window.hpp>
|
|
|
|
#include "Game.hpp"
|
|
|
|
#include <iostream>
|
|
int main()
|
|
{
|
|
sf::RenderWindow window(sf::VideoMode({800, 450}), "Colysis", sf::Style::Close | sf::Style::Titlebar);
|
|
window.setMinimumSize(sf::Vector2u{800, 450});
|
|
|
|
try {
|
|
Game game(window);
|
|
game.run();
|
|
}
|
|
catch (const std::runtime_error& e)
|
|
{
|
|
std::cerr << e.what() << std::endl;
|
|
}
|
|
catch (const std::exception& e)
|
|
{
|
|
std::cerr << e.what() << std::endl;
|
|
}
|
|
catch (...)
|
|
{
|
|
std::cerr << "Unknown error" << std::endl;
|
|
}
|
|
|
|
std::flush(std::cerr);
|
|
return 0;
|
|
}
|