/*
 * Copyright (C) 2004 Christian Hubinger <e9806056@student.tuwien.ac.at>
 */

#include "kfreerings.h"
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>

static const char description[] =
    I18N_NOOP("KFreeRings - A Small Puzzle Game");

static const char version[] = "1.0";

static KCmdLineOptions options[] = {
        //    { "+[URL]", I18N_NOOP( "Document to open." ), 0 },
        KCmdLineLastOption
    };

int main(int argc, char **argv) {
	KAboutData about("kfreerings", I18N_NOOP("KFreeRings"), version, description,
	                 KAboutData::License_GPL, "(C) 2001 - 2004 Christian Hubinger", 0, 0, "e9806056@student.tuwien.ac.at");
	about.addAuthor( "Christian Hubinger", I18N_NOOP("Implementation and Maintainance"), "e9806056@student.tuwien.ac.at" );
	about.addAuthor( "Walter Brandstetter", I18N_NOOP("Basic idea for the game"), "w.b.grafik@vienna.at" );
	KCmdLineArgs::init(argc, argv, &about);
	KCmdLineArgs::addCmdLineOptions( options );
	KApplication app;
	KFreeRings *mainWin = 0;

	if (app.isRestored()) {
		RESTORE(KFreeRings);
	} else {
		// no session.. just start up normally
		KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

		mainWin = new KFreeRings();
		app.setMainWidget( mainWin );
		mainWin->show();

		args->clear();
	}

	// mainWin has WDestructiveClose flag by default, so it will delete itself.
	return app.exec();
}

