/* main.cpp: Start point of game derived from H.S. Fortuna's PS2 game framework code (http://www.hsfortuna.pwp.blueyonder.co.uk/). Added initialisation of random number generator

   Copyright (C) 2008  Stuart William Coulson

   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, either version 3 of the License, or
   (at your option) any later version.

   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 "game.h"
#include <stdio.h>
#include <ctime>    // For time()
#include <cstdlib>  // For srand() and rand()

using namespace std;

int main(void)
{
	srand(time(0));			//Initialise random number generator with current time.
	
	CGame Game;
	
	if(Game.Start())
	{			
		printf("\nGame started\n");
		
		while(Game.GetRunningStatus())
		{
			Game.GameLoop();
		}
	}
	
	else printf("Startup Failed\n");
	
	printf("\nGame stopping\n\n");
	
	Game.Stop();
	
	return 0;
}

