Compare commits

3 Commits
5 changed files with 43 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from dataclasses import dataclass
from typing import Optional
from .input import SessionInput
from .network import SessionNetworkController
from .state import SessionState
from .ui.views import SessionPanel
@dataclass(frozen=True)
class SessionContext:
input: SessionInput
network: SessionNetworkController
state: SessionState
view: SessionPanel
@dataclass
class AppContext:
session: Optional[SessionContext] = None
+3
View File
@@ -0,0 +1,3 @@
from .session_input import SessionInput
__all__ = ["SessionInput"]
+16
View File
@@ -0,0 +1,16 @@
from mind_reader.app_context import SessionContext
from mind_reader.domain import ArrowDirection
class SessionInput:
def __init__(self, context: SessionContext):
self._context = context
def start_session(self) -> None:
pass
def make_local_move(self, direction: ArrowDirection) -> bool:
pass
def finish_session(self) -> None:
pass
+2
View File
@@ -1,7 +1,9 @@
from .controller import NetworkController
from .protocol import NetworkMesssage
from .session_network_controller import SessionNetworkController
__all__ = [
"SessionNetworkController",
"NetworkController",
"NetworkMesssage",
]
@@ -0,0 +1,2 @@
class SessionNetworkController:
pass