American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python OOP – Joel

June 24 @ 7:00 pm - 8:00 pm

Today we did:
  1. We continued with MonsterSystem and started the play adventure game feature.

 

 

Homework:
  1. In the constructor, make a self.attack_menu that has 2 selections:
    1. Magic Attack
    2. Sword Attack
  2. In the menu string, also ask them to enter their selection.
  3. Then, in the self.play_adventure_game, use this self.attack_menu to ask for their selection. Store the attack that they selected.
  4. If the user selected sword attack, make a sword_attack method.
  5. 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’.

Details

Date:
June 24
Time:
7:00 pm - 8:00 pm