to which this task might be related. This is to be done using
classes and list, stack, or queue Abstract Data Structure. If you
can just write the code (roughly) mention in the comment what are
you referring to exactly and then I can add this in the base code,
see if it works, discuss with you on comments and get it working,
should be good
In this mode, a Pokemon fights a round and then is sent to the
back of the team, making the next pokemon in the party fight the
next round. The battle ends when at least one of the teams is
empty. You should again choose one of the ADTs provided to you to
make this mode work the way it is intended. Once you have chosen a
suitable ADT, you must now edit the assign_team method that you
made in the previous task to assign the team in this newly selected
ADT, if the battle mode is set to 1. You will also need to edit
battle.py to accommodate the rotating mode of battle. You should
add a new method called rotating_mode_battle(self) -> str which
asks the user for input and sets up the players’ teams in such an
order where a Pokemon fights one round and then gets sent back to
its team. It is here where you set the team’s battle mode to 1.
This method should not take any arguments. This method returns the
name of the player that wins the battle, Draw otherwise. NOTE: The
order of the Pokemon in this battle mode MUST be Charmanders ->
Bulbasaurs -> Squirtles An example of a rotating mode battle
would be the following: Team 1: C1 C2 B1 B2 S1 Team 2: B1 B2 S1
Round 1: Team 1’s C1 faints Team 2’s B1 Round 2: Team 1’s C2 faints
Team 2’s B2 Round 3: Team 1’s B1 fights Team 2’s S1 and both live
Round 4: Team 1’s B2 faints Team 2’s S1 So we can see that each
round has a different Pokemon fighting until one team has only one
Pokemon left, where that Pokemon keeps fighting until the battle
ends.
Downvote for wrong answers.
Thanks!
rotating mode battle Team 1 Team 2 S1 B2 B1 C2 C1 before battle B1 B2 S1 round 1 S1 B2 B1 C2 C1 B1 B2 S1 C1 S1B2B1C2 round 2 B2 S1 C2 C1 S1B2B1 round 3 S1 B1 C2 C1 S1B2 round 4 S1