Question: I do not know how to code Stadium part. Stadium (1.75 pts): Constructor () o Stadium Name o Pokemon A o Pokemon B

I do not know how to code Stadium part.

Stadium (1.75 pts):
• Constructor ()
o Stadium Name
o Pokemon A
o Pokemon B
• Battle Method:
o Follows the following sequence of events:
o Both Pokemon Speak to each other
o Next, the Pokemon attack each other until one of the Pokemon's health points is
0
o At each iteration, the health points and attacks of each Pokemon should display
to the user running the program

Below is what I did now.

class Pokemon:
def __init__(self, name, level=1, health=100, pokemon_type="Normal" ):
self.name = name
self.level = level
self.health = health
self.type = pokemon_type
def attack(self, attackee):
print(self.name, "Attacks",attackee.name )
attackee.health = attackee.health - 10
def speak(self):
print("Pokemon sound")

def __str__(self):
return "Pokemon: {}".format(self.name)

class Pikachu(Pokemon):
def __init__(self):
Pokemon.__init__(self, Pikachu, level=1, health=100, pokemon_type="Electic")

def attack(self, attackee):
attackee.health -= 10
print("\n",self.name,"Attacks",attackee.name,"Using Thrunderbolt")

def speak(self):
print("Pika Pika...Pikachu")

class Bulbasaur(Pokemon):
def __init__(self):
Pokemon.__init__(self, Bulbasaur, level=1, health=100, pokemon_type="Using Grass")

def attack(self, attackee):
attackee.health -=20
print("\n",self.name,"Attacks",attackee.name,"Razor Leaf")
def speak(self):
print("Bulba Bulba...Bulbasaur")

 

 

class Stadium():
def __init__(self, name, pokemon_a, pokemon_b):

pass

def battle(self):

pass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement the Stadium class and its methods you ca... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!