Projekt_Sztuczna_Inteligencja/mine_models/mine.py
2021-04-14 12:01:20 +02:00

20 lines
419 B
Python

# module for abstract classes
from abc import ABC, abstractmethod
# type hints
from typing import Tuple
# Mine cannot be instantiated
# all abstract methods must be implemented in derived classes
class Mine(ABC):
@abstractmethod
def __init__(self, position: Tuple[int, int], active=True):
self.position = position
self.active = active
@abstractmethod
def disarm(self):
pass