17 lines
440 B
Python
17 lines
440 B
Python
from abc import abstractmethod
|
|
|
|
from game.game import Game
|
|
|
|
class GameHandler:
|
|
def __init__(self, game: Game):
|
|
self.game = game
|
|
self.game.set_waiting_for_input_callback(self.on_input_request)
|
|
self.game.set_position_update_callback(self.on_position_update)
|
|
|
|
@abstractmethod
|
|
def on_position_update(self) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def on_input_request(self) -> str:
|
|
pass |