SlideShare a Scribd company logo
1 of 1
Download to read offline
how would i write the main code in the main file to help fit the subclasses so i could run the game?
in python please
Create a game where the user must defeat three pokmon to win the game. Use inheritance to
implement the following class diagram in your program. begin{tabular}{|l|} hline multicolumn{1}{|c|}{
Fire } hline multicolumn{1}{|c|}{( begin{array}{l}text {-emit_(self, name) } text { _ire_blast(self,
opponent): str opponent): str }end{array} )} hline end{tabular} Abstract Pokemon Class
(pokemon.py) - 1. _init__self, name, type) - set the_name, and_type using the parameters, assign
the _battle_table the 2D list given above, and set_hp to 25 . 2. hp property - use a decorator to get
(not set) the value of hp. 3. get_normal_menu(self) - returns a string with the menu options for the
normal moves: slam and tackle. 4._normal_move(self, opponent, move) - use the move parameter
to choose to call either slam or tackle method, returns the string returned from those methods.
5._slam(self, opponent) and_tackle(self, opponent) - randomize some damage (slam 1-8, tackle 3-
6), call take_damage on the opponent and return a string description of the move using both
pokemons names, the type of move, and the amount of damage taken. 6. get_special_menu(self)
- abstract (overridden in the subclasses) - returns the menu for the special moves of each type. 7.
_special_move(self, opponent, move) - abstract (overridden in the subclasses) - uses the move
parameter to choose to call either of the special moves for that type. 8. attack(self, opponent, type,
move) - use the type parameter to choose to call either _normal_move or_special_move. 9.
__str_(self) - display the pokemon's name and hp in the format "Name: hp/25 ".
10._take_damage(self,dmg) - the damage the pokemon takes. Subtract the dmg value from the
pokemon's_hp. Check that the_hp doesn't go past 0 (if it's negative, reset it to 0 ).

More Related Content

More from prabhudhanakodi6

Why the last RNA primer on the lagging strand cannot be repl.pdf
Why the last RNA primer on the lagging strand cannot be repl.pdfWhy the last RNA primer on the lagging strand cannot be repl.pdf
Why the last RNA primer on the lagging strand cannot be repl.pdfprabhudhanakodi6
 
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdf
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdfYnetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdf
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdfprabhudhanakodi6
 
XYZ Corporation has the following stock information for the .pdf
XYZ Corporation has the following stock information for the .pdfXYZ Corporation has the following stock information for the .pdf
XYZ Corporation has the following stock information for the .pdfprabhudhanakodi6
 
Which of the following occurs in binary fission but not in m.pdf
Which of the following occurs in binary fission but not in m.pdfWhich of the following occurs in binary fission but not in m.pdf
Which of the following occurs in binary fission but not in m.pdfprabhudhanakodi6
 
When the Macintosh computer was introduced in 1982 Apple ma.pdf
When the Macintosh computer was introduced in 1982 Apple ma.pdfWhen the Macintosh computer was introduced in 1982 Apple ma.pdf
When the Macintosh computer was introduced in 1982 Apple ma.pdfprabhudhanakodi6
 
The nurse has just attended a conference on North American N.pdf
The nurse has just attended a conference on North American N.pdfThe nurse has just attended a conference on North American N.pdf
The nurse has just attended a conference on North American N.pdfprabhudhanakodi6
 
Thelma and Louise are neighbors During the winter it is im.pdf
Thelma and Louise are neighbors During the winter it is im.pdfThelma and Louise are neighbors During the winter it is im.pdf
Thelma and Louise are neighbors During the winter it is im.pdfprabhudhanakodi6
 
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdf
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdfthe 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdf
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdfprabhudhanakodi6
 
Social engineering is the process of using interpersonal ski.pdf
Social engineering is the process of using interpersonal ski.pdfSocial engineering is the process of using interpersonal ski.pdf
Social engineering is the process of using interpersonal ski.pdfprabhudhanakodi6
 
source of fluid from joints.pdf
source of fluid from joints.pdfsource of fluid from joints.pdf
source of fluid from joints.pdfprabhudhanakodi6
 
Question 27 03 pts In which environment are you most likely.pdf
Question 27 03 pts In which environment are you most likely.pdfQuestion 27 03 pts In which environment are you most likely.pdf
Question 27 03 pts In which environment are you most likely.pdfprabhudhanakodi6
 
Pregunta 132 puntos Cul es CORRECTO sobre los virus oncog.pdf
Pregunta 132 puntos  Cul es CORRECTO sobre los virus oncog.pdfPregunta 132 puntos  Cul es CORRECTO sobre los virus oncog.pdf
Pregunta 132 puntos Cul es CORRECTO sobre los virus oncog.pdfprabhudhanakodi6
 
Assume a Poisson distribution a If 25 find PX10 b .pdf
Assume a Poisson distribution a If 25 find PX10 b .pdfAssume a Poisson distribution a If 25 find PX10 b .pdf
Assume a Poisson distribution a If 25 find PX10 b .pdfprabhudhanakodi6
 
Discussion question Trainers should have the following char.pdf
Discussion question Trainers should have the following char.pdfDiscussion question Trainers should have the following char.pdf
Discussion question Trainers should have the following char.pdfprabhudhanakodi6
 
A Firm that has integrated world wide operations through a c.pdf
A Firm that has integrated world wide operations through a c.pdfA Firm that has integrated world wide operations through a c.pdf
A Firm that has integrated world wide operations through a c.pdfprabhudhanakodi6
 
create fall risk assessment in aged care and The plan must i.pdf
create fall risk assessment in aged care and The plan must i.pdfcreate fall risk assessment in aged care and The plan must i.pdf
create fall risk assessment in aged care and The plan must i.pdfprabhudhanakodi6
 
33 En cul de las siguientes tecnologas se puede almacen.pdf
33  En cul de las siguientes tecnologas se puede almacen.pdf33  En cul de las siguientes tecnologas se puede almacen.pdf
33 En cul de las siguientes tecnologas se puede almacen.pdfprabhudhanakodi6
 
2 A hospital has a large number of registered physicians .pdf
2  A hospital has a large number of registered physicians .pdf2  A hospital has a large number of registered physicians .pdf
2 A hospital has a large number of registered physicians .pdfprabhudhanakodi6
 
Alice Delvecchio is married and files a joint return with he.pdf
Alice Delvecchio is married and files a joint return with he.pdfAlice Delvecchio is married and files a joint return with he.pdf
Alice Delvecchio is married and files a joint return with he.pdfprabhudhanakodi6
 

More from prabhudhanakodi6 (20)

Why the last RNA primer on the lagging strand cannot be repl.pdf
Why the last RNA primer on the lagging strand cannot be repl.pdfWhy the last RNA primer on the lagging strand cannot be repl.pdf
Why the last RNA primer on the lagging strand cannot be repl.pdf
 
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdf
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdfYnetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdf
Ynetim Kurulu Srekliliinde kuruluun grevlilerinin gelit.pdf
 
XYZ Corporation has the following stock information for the .pdf
XYZ Corporation has the following stock information for the .pdfXYZ Corporation has the following stock information for the .pdf
XYZ Corporation has the following stock information for the .pdf
 
Which of the following occurs in binary fission but not in m.pdf
Which of the following occurs in binary fission but not in m.pdfWhich of the following occurs in binary fission but not in m.pdf
Which of the following occurs in binary fission but not in m.pdf
 
When the Macintosh computer was introduced in 1982 Apple ma.pdf
When the Macintosh computer was introduced in 1982 Apple ma.pdfWhen the Macintosh computer was introduced in 1982 Apple ma.pdf
When the Macintosh computer was introduced in 1982 Apple ma.pdf
 
TT1.pdf
TT1.pdfTT1.pdf
TT1.pdf
 
The nurse has just attended a conference on North American N.pdf
The nurse has just attended a conference on North American N.pdfThe nurse has just attended a conference on North American N.pdf
The nurse has just attended a conference on North American N.pdf
 
Thelma and Louise are neighbors During the winter it is im.pdf
Thelma and Louise are neighbors During the winter it is im.pdfThelma and Louise are neighbors During the winter it is im.pdf
Thelma and Louise are neighbors During the winter it is im.pdf
 
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdf
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdfthe 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdf
the 3 yeenterm on a mortgage of 133000 amoriaed over 15 ye.pdf
 
Social engineering is the process of using interpersonal ski.pdf
Social engineering is the process of using interpersonal ski.pdfSocial engineering is the process of using interpersonal ski.pdf
Social engineering is the process of using interpersonal ski.pdf
 
source of fluid from joints.pdf
source of fluid from joints.pdfsource of fluid from joints.pdf
source of fluid from joints.pdf
 
Question 27 03 pts In which environment are you most likely.pdf
Question 27 03 pts In which environment are you most likely.pdfQuestion 27 03 pts In which environment are you most likely.pdf
Question 27 03 pts In which environment are you most likely.pdf
 
Pregunta 132 puntos Cul es CORRECTO sobre los virus oncog.pdf
Pregunta 132 puntos  Cul es CORRECTO sobre los virus oncog.pdfPregunta 132 puntos  Cul es CORRECTO sobre los virus oncog.pdf
Pregunta 132 puntos Cul es CORRECTO sobre los virus oncog.pdf
 
Assume a Poisson distribution a If 25 find PX10 b .pdf
Assume a Poisson distribution a If 25 find PX10 b .pdfAssume a Poisson distribution a If 25 find PX10 b .pdf
Assume a Poisson distribution a If 25 find PX10 b .pdf
 
Discussion question Trainers should have the following char.pdf
Discussion question Trainers should have the following char.pdfDiscussion question Trainers should have the following char.pdf
Discussion question Trainers should have the following char.pdf
 
A Firm that has integrated world wide operations through a c.pdf
A Firm that has integrated world wide operations through a c.pdfA Firm that has integrated world wide operations through a c.pdf
A Firm that has integrated world wide operations through a c.pdf
 
create fall risk assessment in aged care and The plan must i.pdf
create fall risk assessment in aged care and The plan must i.pdfcreate fall risk assessment in aged care and The plan must i.pdf
create fall risk assessment in aged care and The plan must i.pdf
 
33 En cul de las siguientes tecnologas se puede almacen.pdf
33  En cul de las siguientes tecnologas se puede almacen.pdf33  En cul de las siguientes tecnologas se puede almacen.pdf
33 En cul de las siguientes tecnologas se puede almacen.pdf
 
2 A hospital has a large number of registered physicians .pdf
2  A hospital has a large number of registered physicians .pdf2  A hospital has a large number of registered physicians .pdf
2 A hospital has a large number of registered physicians .pdf
 
Alice Delvecchio is married and files a joint return with he.pdf
Alice Delvecchio is married and files a joint return with he.pdfAlice Delvecchio is married and files a joint return with he.pdf
Alice Delvecchio is married and files a joint return with he.pdf
 

Recently uploaded

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

how would i write the main code in the main file to help fit.pdf

  • 1. how would i write the main code in the main file to help fit the subclasses so i could run the game? in python please Create a game where the user must defeat three pokmon to win the game. Use inheritance to implement the following class diagram in your program. begin{tabular}{|l|} hline multicolumn{1}{|c|}{ Fire } hline multicolumn{1}{|c|}{( begin{array}{l}text {-emit_(self, name) } text { _ire_blast(self, opponent): str opponent): str }end{array} )} hline end{tabular} Abstract Pokemon Class (pokemon.py) - 1. _init__self, name, type) - set the_name, and_type using the parameters, assign the _battle_table the 2D list given above, and set_hp to 25 . 2. hp property - use a decorator to get (not set) the value of hp. 3. get_normal_menu(self) - returns a string with the menu options for the normal moves: slam and tackle. 4._normal_move(self, opponent, move) - use the move parameter to choose to call either slam or tackle method, returns the string returned from those methods. 5._slam(self, opponent) and_tackle(self, opponent) - randomize some damage (slam 1-8, tackle 3- 6), call take_damage on the opponent and return a string description of the move using both pokemons names, the type of move, and the amount of damage taken. 6. get_special_menu(self) - abstract (overridden in the subclasses) - returns the menu for the special moves of each type. 7. _special_move(self, opponent, move) - abstract (overridden in the subclasses) - uses the move parameter to choose to call either of the special moves for that type. 8. attack(self, opponent, type, move) - use the type parameter to choose to call either _normal_move or_special_move. 9. __str_(self) - display the pokemon's name and hp in the format "Name: hp/25 ". 10._take_damage(self,dmg) - the damage the pokemon takes. Subtract the dmg value from the pokemon's_hp. Check that the_hp doesn't go past 0 (if it's negative, reset it to 0 ).