17 lines
421 B
Python
17 lines
421 B
Python
# for type hints (predecessor)
|
|
from __future__ import annotations
|
|
|
|
from .mine import Mine
|
|
|
|
|
|
class ChainedMine(Mine):
|
|
def __init__(self, position, predecessor: ChainedMine = None, active=True):
|
|
self.predecessor = predecessor
|
|
self.type = "chained"
|
|
super().__init__(position, active)
|
|
|
|
def disarm(self):
|
|
if (self.predecessor.active == False):
|
|
super().disarm()
|
|
pass
|