[x] The Map class is implemented as a connected graph. The graph’s nodes represents a
territory (implemented as a Territory class). Edges between nodes represent adjacency
between territories
[x] Continents are connected subgraphs. Each territory belongs to one and only one continent.
[x] A territory is owned by a player and contain a number of armies.
[x] The Map class can be used to represent any map graph configuration.
[x] The Map class includes a validate() method that makes the following checks: 1) the map
is a connected graph, 2) continents are connected subgraphs and 3) each country belongs to
one and only one continent.
[x] Driver that creates different Map objects and checks whether they are valid or not.
Description
Implement a group of C++ classes that implement the structure and operation of a map for the game Warzone
(https://www.warzone.com/). The map must be implemented as a connected graph, where each node represents
a territory. Edges between nodes represent adjacency between territories. Each territory can have any number of
adjacent territories. Continents must also be connected subgraphs, where each territory belongs to one and only
one continent. Each territory is owned by a player and contain a number of armies. The Map class can be used to
represent any map configuration. All the classes/functions that you implement for this component must all reside
in a single .cpp/.h file duo named Map.cpp/Map.h. You must deliver a file named MapDriver.cpp file that
contains a main function that creates a map and demonstrates that the map class implements the following
verifications: 1) the map is a connected graph, 2) continents are connected subgraphs and 3) each country
belongs to one and only one continent. The driver must provide test cases for various valid/invalid maps.
Tasks
[x] The Map class is implemented as a connected graph. The graph’s nodes represents a territory (implemented as a Territory class). Edges between nodes represent adjacency between territories
[x] Continents are connected subgraphs. Each territory belongs to one and only one continent.
[x] A territory is owned by a player and contain a number of armies.
[x] The Map class can be used to represent any map graph configuration.
[x] The Map class includes a validate() method that makes the following checks: 1) the map is a connected graph, 2) continents are connected subgraphs and 3) each country belongs to one and only one continent.
[x] Driver that creates different Map objects and checks whether they are valid or not.
Description
Implement a group of C++ classes that implement the structure and operation of a map for the game Warzone (https://www.warzone.com/). The map must be implemented as a connected graph, where each node represents a territory. Edges between nodes represent adjacency between territories. Each territory can have any number of adjacent territories. Continents must also be connected subgraphs, where each territory belongs to one and only one continent. Each territory is owned by a player and contain a number of armies. The Map class can be used to represent any map configuration. All the classes/functions that you implement for this component must all reside in a single .cpp/.h file duo named Map.cpp/Map.h. You must deliver a file named MapDriver.cpp file that contains a main function that creates a map and demonstrates that the map class implements the following verifications: 1) the map is a connected graph, 2) continents are connected subgraphs and 3) each country belongs to one and only one continent. The driver must provide test cases for various valid/invalid maps.