Projekt_Sztuczna_Inteligencja/mines/mine_models/mine.py

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