1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
//Battle with Samer
#include <iostream>
#include <string>
#include <sstream>
#include <ctime>
#include <cstdlib>
using namespace std;
const char* PokemonSamer[6] = {
"Charizard", "Umbreon", "Mew", "Arcanine", "Espurr", "Luxaray"
};
int Samerhealth[6] = { 15, 10, 25, 15, 10, 10};
int Trainerhealth[3]={ 15, 20, 10};
int main()
{
string mystr;
string Samer;
string Trainer;
cout << "Musician Samer wants to battle!" "\n";
cout << "Go, ";
srand((unsigned)time(0));
cout << PokemonSamer[rand() % 6] << "!"<< "\n";
cout << "Please Choose your Pokemon: \n";
cout << "Charizard, Slowking, Weavile \n";
getline(cin, mystr);
stringstream(mystr) >> Trainer;
cout << Trainer << ", I choose you! \n";
cout << "\n";
cout << "Would you like to attack? (yes or no) \n";
getline(cin, mystr);
system("PAUSE");
}
|