/// <summary> /// Creates a new GameMap object /// </summary> protected GameMap() { difficulty = 0; mapID = 0; highscore_controller = null; gameType = 0; map = null; score = null; }
/// <summary> /// Sets up the game map with all the map components /// </summary> /// <param name="diff">The maps difficulty</param> /// <param name="ID">The maps ID</param> /// <param name="type">The game type</param> /// <param name="startRes">The amount of starting resources</param> /// <param name="startLives">The amount of starting lives</param> /// <param name="mapSet">The array of tiles that are the map</param> /// <param name="strat">The strategy to be used to determine the total score calculation and win condition</param> public void Initialize(int diff, int ID, int type, int startRes, int startLives, TileType[,] mapTiles, AbstractGameStrategy strat) { difficulty = diff; mapID = ID; if (mapID == 0) highscore_controller = null; else highscore_controller = new HighScoresDBController(); gameType = type; map = mapTiles; score = GameScore.GetInstance(); score.Initialize(startingLives, startingResources, strat); }