- This event has passed.
7 PM – Python OOP – Joel
June 24 @ 7:00 pm - 8:00 pm
Today we did:
- We continued with MonsterSystem and started the play adventure game feature.
Homework:
- In the constructor, make a self.attack_menu that has 2 selections:
- Magic Attack
- Sword Attack
- In the menu string, also ask them to enter their selection.
- Then, in the self.play_adventure_game, use this self.attack_menu to ask for their selection. Store the attack that they selected.
- If the user selected sword attack, make a sword_attack method.
- In the sword_attack method, get a random number between 10 and 20, and that will be the range of damage that the user can do. Store this random_number as a variable called ‘sword_attack_damage’.