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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#include <iostream>
#include <string>
using namespace std;
struct pokemon
{
string name;
int hits, tricks, blocks, wins;
bool alive;
}
class arena
{
public:
void add_pokemon (pokemon a, string name, int hits, int tricks, int blocks, int wins);
void print roster (pokemon a, string name, int hits, int tricks, int blocks, int wins);
void battle (pokemon a, string name, int hits, int tricks, int blocks, int wins);
private:
void create pokemon (pokemon a, string &name, int &hits, int &tricks, int &blocks, int &wins);
void find_pokemon;
void fight;
};
int main ()
{
int i = 0;
pokemon a[100];
do {
cout << "Welcome to pokemon battle! Please choose an option.\n";
cout << "1. Add Pokemon\n";
cout << "2. Print Roster\n";
cout << "3. Battle\n";
cout << "0. Exit\n";
switch (choice)
{
case 1:
create_pokemon();
case 2:
print_roster();
case 3:
battle();
}
}while (choice != 0)
}
void arena::add_pokemon (string &name, int &hits, int &tricks, int &blocks, int &wins)
{
cout << "What is the name of the new pokemon?\n";
cin >> name;
find_pokemon (name);
while (find_pokemon)
cout <<
}
|