/**
 *  one room arena
 *  Copyright (C) 2016 POSITIVE MENTAL ATTITUDE
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, version 3 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#include <ctime>
#include <iostream>
#include <Starlight.hpp>

/**
 * @brief I can't code. Really. Don't look at this.
 * I code bad codes, and this one is exceptionally bad.
 * And bad c++ codes are very bad.
 * Really.
 * Git out.
 * @return segfaults
 */

int main()
{
	std::cout << "Hello, world!" << std::endl;
	
	ContextSettings settings;
	RenderWindow window;
	Music music;
	
	settings.antialiasingLevel = 8;
	window.create(VideoMode(768, 768, 32), "one room arena", Style::Titlebar | Style::Close, settings);
	window.setVerticalSyncEnabled(true);
	
	music.openFromFile("data/music.ogg");
	music.setLoop(true);
	music.play();
	
	std::srand(std::time(nullptr));
	
	bool keepRunning = false;
	do {
		Player::totalScore = 0;
		keepRunning = false;
		Starlight gaem(&window, &keepRunning);
		gaem.run();
	} while(keepRunning);
	return 0;
}
