« All Events
10 AM – Python OOP – Indo – Gamas
December 16, 2023 @ 10:00 am - 11:00 am
Today We Did
- We continued with Monster Inheritance project.
- We added add monster and list all monster
- We started with Start Adventure menu
- We display all monsters for user to fight.
- We allow user to select a monster.
Homework
- No class on Dec 24 and Dec 30. The class will resume on January 6th.
- Continue on Monster Inheritance. After user enter the correct monster species to fight, display the attack menu like below and get user input. After that you don’t have to do anything else.
What do you want to do with the cyclops
1. Magic attack
2. Sword attack - 10 to 20 damage
Enter your selection: 2
- If you do it properly, it should do like below
1. Add Monster
2. List all monsters
3. Play Adventure
Enter your selection (Enter 'exit' to quit): 2
- Dragon - 100 health - 50 Max attack
- Troll - 50 health - 20 Max attack
- Water Golem - 19 health - 20 Max attack
- Cyclops - 60 health - 30 Max attack
- Unicorn - 70 health - 70 Max attack
Please select one of the following
1. Add Monster
2. List all monsters
3. Play Adventure
Enter your selection (Enter 'exit' to quit): 3
Enter your name: Gamas
Enter player's health: 100
Hi Gamas, Welcome to AYC Logic Adventure Game
Gamas you have 100 health remaining.
Please choose your monster:
- Dragon - 100 health - 50 Max attack
- Troll - 50 health - 20 Max attack
- Water Golem - 19 health - 20 Max attack
- Cyclops - 60 health - 30 Max attack
- Unicorn - 70 health - 70 Max attack
Enter your selection (enter 'stop' to quit the game): cyclops
What do you want to do with the cyclops
1. Magic attack
2. Sword attack - 10 to 20 damage
Enter your selection: 2
You attacked Cyclops with 16 damage and the Cyclops has 44 health remaining.
- As a bonus point, after user select “2. Sword attack – 10 to 20 damage”, If you add the code that will actually reduce the monster health by random damage between 10 to 20 damage, then I will give you 3% bonus point for your final exam.