initial commit
[COMP345---Clone.git] / Campaign.h
blob4572c5435b5b1f7fa9bb6eb2056f50ac51159afe
1 #pragma once
2 #include "Map.h"
3 using namespace std;
5 //! @file
6 //! @brief Class representing the campaign. Will most likely change in future versions
7 //!
9 //! Class representing the campaign.
11 //! Game rules: This class allows for the creation of campaigns. Each campaign consists of maps and a name for the campaign.
12 //! The name is used to save the campaign as a text file. Currently, the only campaign goal is for the player
13 //! to get to the end cell of the last map within the campaign.
14 //!
15 //! Design: No external libraries have been used. The maps are saved in a vector since there is no telling how many maps
16 //! the sure will want to add.
18 class Campaign
20 public:
21 Campaign();
22 Campaign(string newName);
23 ~Campaign();
25 //! Initializes the default values for a campaign
26 void initializeDefaultCampaign();
28 //! Returns a pointer to the vector of maps int the campaign
29 vector<Map*>* getMaps();
31 //! Adds a new map to the campaign
32 //! @param map New map to add to the vector of maps
33 void addMap(Map *map);
35 //! Removes a map from the campaign
36 //! @param map Map to remove from the vector
37 void removeMap(Map *map);
39 //! Returns the campaign's name.
40 //! @return The campaign's name.
41 string getCampaignName();
43 //! Returns the number fo maps in the campaign
44 //! @return The number of maps in the campaign.
45 int getMapsInCampaign();
47 //! Prints the maps within the campaign
48 void printMaps();
50 private:
51 // Variables
53 //! Vector of maps within the campaign
54 vector<Map*>* maps;
56 //! Index of the current map the player is in
57 int currentMapIndex;
59 //! Number of maps in the campaign
60 int mapsInCampaign;
62 //! Name of the campaign
63 string campaignName;