Ejemplo n.º 1
0
/*teLevel
 *Initializes all data structures required for level
 */
void initLevel(int level)    {
    createKeywordQueue();
	switch(level)	{
		case 0:
			readLevelSettingsFile(TUTORIAL_LEVEL);
			break;
		case 1:
			readLevelSettingsFile(HARD_LEVEL);
			break;
		case 2:
			readLevelSettingsFile(EASY_LEVEL);
			break;
		default:
			break;
	}
    createLevelPaths();
    createTowerGroup();
    createActionQueue();
	createGame();
	createLevelClocks();
    createEnemyGroup();
	createTowerPos();
	initialQueueReader();
	createProjectileList();
  	createExplosionList();
	initialiseParser();
	init_abilities();
    destroyCommandList();
}
/*---------- Test Functions ----------*/
void setUpTesting()	{
    createKeywordQueue();
	readLevelSettingsFile(TESTLEVEL);	
    createLevelPaths();
    layTestPath();
    createTowerGroup();
    createActionQueue();
    createGame();
    createLevelClocks();
    createEnemyGroup();
    createTowerPos();
    createProjectileList();
    initialiseParser();
    init_abilities();
}
/*
 *Initializes all data structures required for level
 */
void initLevel(int level)    {
    createKeywordQueue();
	switch(level)	{
		case 0:
			readLevelSettingsFile("../data/tutorial.txt");
			break;
		case 1:
			createLevel();
			break;
		default:
			break;
	}
    createLevelPaths();
    createTowerGroup();
    createActionQueue();
	createGame();
	createLevelClocks();
    createEnemyGroup();
	createTowerPos();
	initialQueueReader();
	createProjectileList();
	initialiseParser();
	init_abilities();
}