2026-05-21 20:31:17 +00:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
# import os
|
|
|
|
|
|
2026-05-21 21:05:50 +00:00
|
|
|
from source.classes import Maze
|
2026-05-21 20:31:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Event:
|
|
|
|
|
def __init__(self, event: str, maze: Maze, player_position: tuple[int, int], path):
|
|
|
|
|
self.event = event
|
|
|
|
|
self.maze = maze
|
|
|
|
|
self.player_position = player_position
|
|
|
|
|
self.path = path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Observer(ABC):
|
|
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
|
def update(self, event: Event):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|