Question: class PokemonSelectionGUI: def init ( self , master ) : self.master = master self.master.title ( Pok mon Selection ) self.selected _ pokemon = tk
class PokemonSelectionGUI:
def initself master:
self.master master
self.master.titlePokmon Selection"
self.selectedpokemon tkStringVar
self.createwidgets
def createwidgetsself:
self.pokemonlistbox tkListboxselfmaster, selectmodetkSINGLE
for pokemon in pokemonlist: # Fixed the variable name here
self.pokemonlistbox.inserttkEND, pokemon
self.pokemonlistbox.bind self.updateimage
self.pokemonlistbox.packpady
self.pokemonimage tkLabelselfmaster, text fontArial
self.pokemonimage.packpady
self.choosebutton tkButtonselfmaster, text"Choose", commandself.choosepokemon
self.choosebutton.packpady
def updateimageself event:
selectedindex self.pokemonlistbox.curselection
if selectedindex:
pokemonname self.pokemonlistbox.getselectedindex
# Here you would update the image based on the selected Pokmon
self.pokemonimage.configtextpokemonname
def choosepokemonself:
selectedindex self.pokemonlistbox.curselection
if selectedindex:
self.selectedpokemon.setselfpokemonlistbox.getselectedindex
# Here you could proceed to the next step, like showing the selection window for player
root tkTk
app PokemonSelectionGUIroot
root.mainloop
printdf
Also the Pokemons we are going to use are given below, drop all others:
Bulbasaur
Ivysaur
Venusaur
Charmander Charmeleon Charizard
Squirtle
Wartortle Blastoise Caterpie Metapod Butterfree
Weedle
Kakuna
Beedrill
Pidgey
Pidgeotto Pidgeot
Above figures you see only Pokemons for each player, but cleaned dataset had of
them? Where are the rest Pokemons?
If you are not familiar with Pokemon universe, pokemons can evolve as they grow up
or fight and get stronger. In the dataset we cleaned actually has different Pokemons,
and every Pokemons has their evolution level and In the battles, the Pokemon
who won the round will get evolved and both it's attributes and image will change. So
other Pokemon will appear in the next phases of the battles.
After both players choose their Pokemons, battle will begin.
Battles are performed turn based, one player hits and after him other player hits. So
be sure when it's one player's turn, other player has to wait and can not attack.
In the figure as you see, since it's Player s turn Player starts the game buttons
of Player are disabled.
Players have two options: physical attack and elemental attack. Difference of physical
and elemental attack is like as follows do not forget to multiply by the health value
of Pokemons given in the csv:
Physical: Can give damage between of Pokemon's attack value.
Elemental: Can give damage between of Pokemon's attack value, if
attacker is elementally stronger than defender Pokemon, damage will
be doubled with a chance.Above figures you see only Pokemons for each player, but cleaned dataset had of
them? Where are the rest Pokemons?
If you are not familiar with Pokemon universe, pokemons can evolve as they grow up
or fight and get stronger. In the dataset we cleaned actually has different Pokemons,
and every Pokemons has their evolution level and In the battles, the Pokemon
who won the round will get evolved and both it's attributes and image will change. So
other Pokemon will appear in the next phases of the battles.
After both players choose their Pokemons, battle will begin.
Battles are performed turn based, one player hits and after him other player hits. So
be sure when it's one player's turn, other player has to wait and can not attack.
In the figure as you see, since it's Player s turn Player starts the game buttons
of Player are disabled.
Players have two options: physical attack and elemental attack. Difference of physical
and elemental attack is like as follows do not forget to multiply by the health value
of Pokemons given in the csv:
Physical: Can give damage between of Pokemon's attack value.
Elemental: Can give damage between of Pokemon's attack value, if
attacker is elementally stronger than defender Pokemon, damage will
be doubled with a chance.Here you need to add the functionality to buttons, they will do the calculations of attack and decrease the HP of opponent, and visually represent it on the screen. Health bars of Pokemons will be updated after every attack Dont forget to take health of Pokemons from dataset!!!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
