Projekt_Sztuczna_Inteligencja/mines/mine_models/chained_mine.py
2021-05-23 00:09:02 +02:00

19 lines
480 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 is None or not self.predecessor.active:
super().disarm()
else:
# boom?
pass