In the next lesson the children will all hire a wizard for their village. The wizard will help protect them but only according to the following algorithm:
FOR each Dragon.Attack
IF Dragon.Magic + Dragon.Intelligence < Wizard.Skill + Wizard.Intelligence
THEN Dragon.Strength = Dragon.Strength – 10
ELSE Wizard.Strength = Wizard.Strength – 5
IF Dragon.Strength = 0 OR < 0
THEN Dragon.Alive = False
IF Wizard.Strength = 0 OR < 0
THEN Wizard.Alive = False
The dragon’s that attack each village will be picked randomly from this list.
How many dragon’s can the Wizard’s dispel?