We are improving our game and need to add an isAlive
property, which returns True
if the lives count is greater than 0
.
Complete the code by adding the isAlive
property.
The code uses a
while
loop to hit thePlayer
, until its lives count becomes 0, using theisAlive
property to make the condition.