Problem 11 (250pts): Scuba
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 writing any code, unlock the tests to verify your understanding of the question:
$ python ok -q 11 -u
Once you are done unlocking, begin implementing your solution. You can check your correctness with:
$ python ok -q 11