Exemplo n.º 1
0
bool Driver::loadPlayersMap(string location){
	Director director;
	MapBuilder* mapWithPlayersBuilder = new MapWithPlayers;
	director.setMapBuilder(mapWithPlayersBuilder);
	if (director.constructMap(location)){
		mainMap = director.getMap();
		mainGame = director.getGame();
		playersSet = true;
		return true;
	}
	else{
		return false;
	}
}
Exemplo n.º 2
0
bool loadOnlyMap(string location){
	Director director;
	MapBuilder* mapWithoutPlayersBuilder = new MapWithoutPlayers;
	director.setMapBuilder(mapWithoutPlayersBuilder);

	if (director.constructMap(location)){
		mainMap = director.getMap();
		return true;
	}
	else{
		return false;
	}

}