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
Step: 1
To implement the Stadium class and its methods you ca...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started