This commit is contained in:
s500512 2024-12-11 16:28:26 +01:00
parent 7baedc8a30
commit f2ba8c96a2

View File

@ -5,12 +5,12 @@ class Plansza:
_instance = None _instance = None
def __new__(cls, *args, **kwargs): def __new__(cls, *args, **kwargs):
if not cls._instance: if not cls._instance:
cls._instance = super().__new__(cls) cls._instance = super().__new__(cls)
return cls._instance return cls._instance
def __init__(self): def __init__(self):
if not hasattr(self, '_initialized'): if not hasattr(self, '_initialized'):
self.pole = [['O' for x in range(5)] for y in range(5)] self.pole = [['O' for x in range(5)] for y in range(5)]
self._initialized = True self._initialized = True