-3

ライフが <= 0 の場合に false を返す関数があります。

def isAlive(self):
    if self.lives <= 0:
       return False
    return True

ただし、常に True を返します。

4

1 に答える 1