American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Intro To Java – Gamas

June 25 @ 5:00 am - 6:00 pm

Today We Did
  1. We started Monster Inheritance project.
    1. We added main menu and implemented List All Monsters and Add New monster.
Homework

Continue with Monster Inheritance project.

  1. After user enter monster species, the program has to check if the species that user enters exists in the map or not. If it does not exists, print it does not exists.
  2. If it exists, display the attack menu.
  3. One of the attack menu is “2. Sword attack (10 – 20 damage)”. Add code to implement this feature.
    1. This Sword attack supposed to generate damage randomly between 10 to 20 damage to the selected monster’s health.
    2. At the same time, the monster will attack player’s health according to monster.minAttack and monster.maxAttack.
  4. Look at below example for expected behavior.
  5. Please select from one of the following
    1. Add new monster
    2. List all monsters
    3. Play the game
    Enter your selection (enter "exit" to quit): 2
    
    LIST ALL MONSTERS
    Troll - 70 health, Attack (20 to 60)
    Dragon - 100 health, Attack (50 to 100)
    water golem - 70 health, Attack (20 to 60)
    
    Please select from one of the following
    1. Add new monster
    2. List all monsters
    3. Play the game
    Enter your selection (enter "exit" to quit): 3
    
    PLAY GAME
    What is your name: Gamas
    How much health do you want: 100
    
    Gamas has 100 health remaining.
    Please select one of the following monsters:
    Troll - 70 health, Attack (20 to 60)
    Dragon - 100 health, Attack (50 to 100)
    water golem - 70 health, Attack (20 to 60)
    Enter your selection (Enter 'stop' to end the game): unicorn
    We can not find this monster in our system: unicorn
    
    Gamas has 100 health remaining.
    Please select one of the following monsters:
    Troll - 70 health, Attack (20 to 60)
    Dragon - 100 health, Attack (50 to 100)
    water golem - 70 health, Attack (20 to 60)
    Enter your selection (Enter 'stop' to end the game): troll
    
    What do you want to do with the troll:
    1. Magic attack
    2. Sword attack (10 - 20 damage)
    3. Arrow attack ( 5 - 10 damage)
    4. Heal
    Enter your selection: 2
    
    MELEE ATTACK MONSTER
    You attacked Troll and caused 19 damages. The Troll has 51 health remaining.
    Troll attacked Gamas and did 49 damages.
    
    Gamas has 51 health remaining.
    Please select one of the following monsters:
    Troll - 51 health, Attack (20 to 60)
    Dragon - 100 health, Attack (50 to 100)
    water golem - 70 health, Attack (20 to 60)
    Enter your selection (Enter 'stop' to end the game): water golem
    
    What do you want to do with the water golem:
    1. Magic attack
    2. Sword attack (10 - 20 damage)
    3. Arrow attack ( 5 - 10 damage)
    4. Heal
    Enter your selection: 2
    
    MELEE ATTACK MONSTER
    You attacked water golem and caused 18 damages. The water golem has 52 health remaining.
    water golem attacked Gamas and did 13 damages.
    
    Gamas has 38 health remaining.
    Please select one of the following monsters:
    Troll - 51 health, Attack (20 to 60)
    Dragon - 100 health, Attack (50 to 100)
    water golem - 52 health, Attack (20 to 60)
    Enter your selection (Enter 'stop' to end the game):

Details

Date:
June 25
Time:
5:00 am - 6:00 pm
Verified by MonsterInsights