American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6:30 PM – Intro To Java – Darin

August 3 @ 6:30 pm - 7:30 pm

Gamas Sub

Today We Did
  1. We learned how to display the monster menu dynamically
  2. We added Monster minAttack
  3. We removed monsterList.
  4. We added Sword Attack feature. We have not put the codes to reduce player’s health. We will do this next week.
Homework
  1. Add codes to implement Arrow Attack (5 – 10 damages). This is very similar to Sword Attack.
  2. Add codes to implement Heal.
  3. Look at below example
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): 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: 3

ARROW ATTACK
You attacked Troll and caused 10 damages. The Troll has 60 health remaining.
Troll attacked Gamas and did 49 damages.

Gamas has 51 health remaining.
Please select one of the following monsters:
Troll - 60 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: 4

HEAL MONSTER
How much health you want to heal Troll: 20
Monster now has 80 remaining health.

Gamas has 51 health remaining.
Please select one of the following monsters:
Troll - 80 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):

Details

Date:
August 3
Time:
6:30 pm - 7:30 pm
Verified by MonsterInsights