/// <summary> /// Generate the map to play within /// </summary> /// <param name="map">The map to generate the game from</param> public void GenerateMap(BaseMap map) { // Clear the canvas _display.GameArea.Children.Clear(); Tiles.Clear(); IsPaused = false; // Reset the player Player.Score = new ScoreArgs(); Player.Ground(); _display.GameArea.Children.Add(Player.Representation); // Generate the map Map = map; Map.GenerateMap(this); // Fill the players score Player.Score.CoinsAvailable = Tiles.Count(t => t is Coin); Player.Score.MegaCoinsAvailable = Tiles.Count(t => t is MegaCoin); }