Problem 11 (250pts): ScubaThrower
Currently there are no ants that can be placed on Water
. Implement the ScubaThrower
, which is a subclass of ThrowerAnt
that is more costly and watersafe, but otherwise identical to its base class. A ScubaThrower
should not lose its health when placed in Water
.
Class | Food Cost | Health | |
---|---|---|---|
ScubaThrower | 6 | 1 |
We have not provided you with a class header. Implement the ScubaThrower
class from scratch. Give it a class attribute name
with the value 'Scuba'
(so that the graphics work) and remember to set the class attribute implemented
with the value True
(so that you can use it in a game).
Before
Before writing any code, read the instructions and test your understanding of the problem:
python ok -q 11 -u
After
After writing code, test your implementation:
python ok -q 11