int _tmain(int argc, _TCHAR* argv[]) { int speed, cost; float road_clearance; std::string s; TQueue<Cars> q; int choice = 0; Cars *item; std::cout << "Hello, here are possbile actions: " << std::endl; std::cout << "1: Push item (Press a). Enter\n\t1. Jeep. Then enter price and road clearance\n\t2. Sedan. Then enter price and speed\n\t3. Hatchback. Then enter price and speed" << std::endl; std::cout << "2: Pop item (Press p)" << std::endl; std::cout << "3: Search (Press s). Enter\n\t1. Jeep. Then enter price and road clearance\n\t2. Sedan. Then enter price and speed\n\t3. Hatchback. Then enter price and speed" << std::endl;; std::cout << "4: Remove item (Press r). Enter\n\t1. Jeep. Then enter price and road clearance\n\t2. Sedan. Then enter price and speed\n\t3. Hatchback. Then enter price and speed" << std::endl; std::cout << "5: Destroy all container (Press d)" << std::endl; std::cout << "6: Output all container items (Press o)" << std::endl; std::cout << "6: Quit (Press q)" << std::endl; while ((choice = getchar()) != 'q') { fflush(stdin); switch (choice) { std::cout << choice << std::endl; case 'a': if ((choice = getchar()) == '1') { std::cin >> cost >> road_clearance; Jeep jeep(cost, road_clearance); q.PushBack(jeep); } else if (choice == '2') { std::cin >> cost >> speed; q.PushBack(Sedan(cost, speed)); }
void Player::initTechnologies() { Technologie recherche("Recherche", "Permet de débloquer la bibliothèque et la recherche de technologies.", 0, 0, 0, 0); Technologie exploration("Exploration", "Description", 0, 0, 0, 0); Technologie vivres("Vivres", "Description", 0, 0, 0, 0); Technologie petrole("Pétrole", "Description", 0, 0, 0, 0); Technologie caserne("Caserne", "Description", 0, 0, 0, 0); Technologie avantPoste("Avant poste", "Description", 0, 0, 0, 0); Technologie recrutement("Recrutement", "Description", 0, 0, 0, 0); Technologie metal("Métal", "Description", 0, 0, 0, 0); Technologie soldat("Soldat", "Description", 0, 0, 0, 0); Technologie demolisseur("Démolisseur", "Description", 0, 0, 0, 0); Technologie usine("Usine", "Description", 0, 0, 0, 0); Technologie aeroport("Aéroport", "Description", 0, 0, 0, 0); Technologie port("Port", "Description", 0, 0, 0, 0); Technologie jeep("Jeep", "Description", 0, 0, 0, 0); Technologie charAssault("Char", "Description", 0, 0, 0, 0); Technologie artillerie("Artillerie", "Description", 0, 0, 0, 0); Technologie dca("DCA", "Description", 0, 0, 0, 0); Technologie chasseur("Chasseur", "Description", 0, 0, 0, 0); Technologie bombardier("Bombardier", "Description", 0, 0, 0, 0); Technologie helicoptere("Hélicoptère", "Description", 0, 0, 0, 0); Technologie cuirasse("Cuirasse", "Description", 0, 0, 0, 0); Technologie torpilleur("Torpilleur", "Description", 0, 0, 0, 0); Technologie corvette("Corvette", "Description", 0, 0, 0, 0); Technologie vivresStock("Stockage de vivres", "Description", 0, 0, 0, 0); Technologie petroleStock("Stockage de pétrole", "Description", 0, 0, 0, 0); Technologie metalStock("Stockage de métaux", "Description", 0, 0, 0, 0); Technologie transportTerrestre("Transport Terrestre", "Description", 0, 0, 0, 0); Technologie transportMarin("Transport Marin", "Description", 0, 0, 0, 0); Technologie transportAerien("Transport Aérien", "Description", 0, 0, 0, 0); recherche.setTechSuivante(exploration); recherche.setTechSuivante(vivres); exploration.setTechSuivante(avantPoste); exploration.setTechSuivante(recrutement); vivres.setTechSuivante(vivresStock); vivres.setTechSuivante(caserne); vivres.setTechSuivante(petrole); vivres.setTechSuivante(metal); caserne.setTechSuivante(soldat); caserne.setTechSuivante(demolisseur); petrole.setTechSuivante(petroleStock); petrole.setTechSuivante(usine); metal.setTechSuivante(petroleStock); metal.setTechSuivante(metalStock); usine.setTechSuivante(aeroport); usine.setTechSuivante(port); usine.setTechSuivante(jeep); usine.setTechSuivante(charAssault); usine.setTechSuivante(artillerie); usine.setTechSuivante(dca); usine.setTechSuivante(transportTerrestre); aeroport.setTechSuivante(chasseur); aeroport.setTechSuivante(bombardier); aeroport.setTechSuivante(helicoptere); aeroport.setTechSuivante(transportAerien); port.setTechSuivante(cuirasse); port.setTechSuivante(torpilleur); port.setTechSuivante(corvette); port.setTechSuivante(transportMarin); demolisseur.setTechPrecedente(caserne); soldat.setTechPrecedente(caserne); caserne.setTechPrecedente(vivres); vivresStock.setTechPrecedente(vivres); petrole.setTechPrecedente(vivres); metal.setTechPrecedente(vivres); metalStock.setTechPrecedente(metal); petroleStock.setTechPrecedente(petrole); usine.setTechPrecedente(petrole); usine.setTechPrecedente(metal); aeroport.setTechPrecedente(usine); port.setTechPrecedente(usine); jeep.setTechPrecedente(usine); charAssault.setTechPrecedente(usine); artillerie.setTechPrecedente(usine); dca.setTechPrecedente(usine); transportTerrestre.setTechPrecedente(usine); chasseur.setTechPrecedente(aeroport); bombardier.setTechPrecedente(aeroport); helicoptere.setTechPrecedente(aeroport); transportAerien.setTechPrecedente(aeroport); cuirasse.setTechPrecedente(port); torpilleur.setTechPrecedente(port); corvette.setTechPrecedente(port); transportMarin.setTechPrecedente(port); vivres.setTechPrecedente(recherche); exploration.setTechPrecedente(recherche); avantPoste.setTechPrecedente(exploration); recrutement.setTechPrecedente(exploration); }