American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

12 PM – Intro To Java – Gamas

March 19, 2022 @ 12:00 pm - 1:00 pm

Today We Do
  1. We started Monster Inheritance project.
  2. We went over how to do inheritance in Java.
Homework:
  1. Continue with Monster Inheritance project. Add the following feature
  2. Add a feature so we can keep track of the player’s health.
  3. Add a feature so we can attack monster using magic attack.
  4. Every time monster is attacked, the monster will attack the player as well. The monster attack should range from 0 to monster.maxAttack which will decrease player’s health.
  5. Gamas has 97 health remaining.
    Please select one of the following monsters:
    - TROLL - health remaining: 20
    - DRAGON - health remaining: 100
    - WATER GOLEM - health remaining: 20
    Enter your selection (Enter 'exit' to quit): dragon
    
    What do you want to do with the water golem:
    1. Magic attack
    2. Melee attack
    3. Arrow attack
    4. Heal
    Enter your selection:1
    
    What kind of magic attack you want to do to DRAGON:
    1. Fire magic - 10 damage
    2. Water magic - 10 damage
    3. Earth magic - 12 damage
    4. Wind magic - 8 damage
    Enter your selection:1
    DRAGON is immune to fire magic attack. No damage is done.
    DRAGON attacked Gamas and did 8 damage

Details

Date:
March 19, 2022
Time:
12:00 pm - 1:00 pm
Verified by MonsterInsights