#include "blitz/network/Network.h"
#include "client/Client.h"
#include "client/audio/AudioManager.h"
#include "client/display/Display.h"
#include "client/render/MainRenderer.h"

int main(int argc, char** argv) {

	blitz::Client client;
	blitz::Display display(1920, 1080, "BlitzKrieg", &client);

	if (!display.Create())
		return EXIT_FAILURE;

	blitz::render::MainRenderer renderer(&client);
	blitz::audio::AudioManager audioManager(&client);
	blitz::network::NetworkInitializer network;

	while (!display.IsCloseRequested()) {
		client.Update();
		display.PollEvents();
		renderer.Update();
		renderer.Render();
		display.Render();
		display.Update();
	}

	return 0;
}
