June 2018
Intermediate to advanced
310 pages
6h 32m
English
Carnivorous snails have had enough of this Maronic hero. He throws peas and bananas at them, only to get to another sorry castle. Now they shall act!
By default, the snail should stand still to conserve snail energy. But when the hero gets close, it dashes towards him aggressively.
If the hero manages to injure it, it should retreat to lick its wounds. Then it will repeat attacking, until one of them is dead.
First, we'll declare what can happen during a snail's life:
interface WhatCanHappen { fun seeHero() fun getHit(pointsOfDamage: Int) fun calmAgain()}
Our snail implements this interface, so it can get notified of anything that may happen to it and act accordingly:
class Snail : WhatCanHappen { private var healthPoints ...
Read now
Unlock full access