diff --git a/src/ttt/application/game/common/__init__.py b/src/ttt/application/game/common/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ttt/application/game/common/ports/__init__.py b/src/ttt/application/game/common/ports/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ttt/application/game/game/cancel_game.py b/src/ttt/application/game/game/cancel_game.py index 092effd..2cf6999 100644 --- a/src/ttt/application/game/game/cancel_game.py +++ b/src/ttt/application/game/game/cancel_game.py @@ -4,9 +4,9 @@ from ttt.application.common.ports.map import Map from ttt.application.common.ports.transaction import Transaction from ttt.application.common.ports.uuids import UUIDs -from ttt.application.game.common.ports.game_views import GameViews -from ttt.application.game.common.ports.games import Games from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews +from ttt.application.game.game.ports.games import Games from ttt.entities.core.game.game import AlreadyCompletedGameError from ttt.entities.core.user.location import UserLocation from ttt.entities.core.user.user import User diff --git a/src/ttt/application/game/game/make_move_in_game.py b/src/ttt/application/game/game/make_move_in_game.py index 5fc863f..8e8ff64 100644 --- a/src/ttt/application/game/game/make_move_in_game.py +++ b/src/ttt/application/game/game/make_move_in_game.py @@ -5,10 +5,10 @@ from ttt.application.common.ports.randoms import Randoms from ttt.application.common.ports.transaction import Transaction from ttt.application.common.ports.uuids import UUIDs -from ttt.application.game.common.ports.game_ai_gateway import GameAiGateway -from ttt.application.game.common.ports.game_views import GameViews -from ttt.application.game.common.ports.games import Games +from ttt.application.game.game.ports.game_ai_gateway import GameAiGateway from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews +from ttt.application.game.game.ports.games import Games from ttt.application.user.common.ports.users import Users from ttt.entities.core.game.cell import AlreadyFilledCellError from ttt.entities.core.game.game import ( diff --git a/src/ttt/application/game/common/ports/game_ai_gateway.py b/src/ttt/application/game/game/ports/game_ai_gateway.py similarity index 100% rename from src/ttt/application/game/common/ports/game_ai_gateway.py rename to src/ttt/application/game/game/ports/game_ai_gateway.py diff --git a/src/ttt/application/game/common/ports/game_starting_queue.py b/src/ttt/application/game/game/ports/game_starting_queue.py similarity index 100% rename from src/ttt/application/game/common/ports/game_starting_queue.py rename to src/ttt/application/game/game/ports/game_starting_queue.py diff --git a/src/ttt/application/game/common/ports/game_views.py b/src/ttt/application/game/game/ports/game_views.py similarity index 100% rename from src/ttt/application/game/common/ports/game_views.py rename to src/ttt/application/game/game/ports/game_views.py diff --git a/src/ttt/application/game/common/ports/games.py b/src/ttt/application/game/game/ports/games.py similarity index 100% rename from src/ttt/application/game/common/ports/games.py rename to src/ttt/application/game/game/ports/games.py diff --git a/src/ttt/application/game/game/start_game.py b/src/ttt/application/game/game/start_game.py index 725192e..7ed1a97 100644 --- a/src/ttt/application/game/game/start_game.py +++ b/src/ttt/application/game/game/start_game.py @@ -5,12 +5,12 @@ from ttt.application.common.ports.map import Map from ttt.application.common.ports.transaction import Transaction from ttt.application.common.ports.uuids import UUIDs -from ttt.application.game.common.ports.game_starting_queue import ( +from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_starting_queue import ( GameStartingQueue, ) -from ttt.application.game.common.ports.game_views import GameViews -from ttt.application.game.common.ports.games import Games -from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews +from ttt.application.game.game.ports.games import Games from ttt.application.user.common.ports.user_views import CommonUserViews from ttt.application.user.common.ports.users import Users from ttt.entities.core.game.game import UsersAlreadyInGameError, start_game diff --git a/src/ttt/application/game/game_with_ai/start_game_with_ai.py b/src/ttt/application/game/game/start_game_with_ai.py similarity index 94% rename from src/ttt/application/game/game_with_ai/start_game_with_ai.py rename to src/ttt/application/game/game/start_game_with_ai.py index e636c9b..a41cdf5 100644 --- a/src/ttt/application/game/game_with_ai/start_game_with_ai.py +++ b/src/ttt/application/game/game/start_game_with_ai.py @@ -5,13 +5,13 @@ from ttt.application.common.ports.randoms import Randoms from ttt.application.common.ports.transaction import Transaction from ttt.application.common.ports.uuids import UUIDs -from ttt.application.game.common.ports.game_ai_gateway import GameAiGateway -from ttt.application.game.common.ports.game_starting_queue import ( +from ttt.application.game.game.ports.game_ai_gateway import GameAiGateway +from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_starting_queue import ( GameStartingQueue, ) -from ttt.application.game.common.ports.game_views import GameViews -from ttt.application.game.common.ports.games import Games -from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews +from ttt.application.game.game.ports.games import Games from ttt.application.user.common.ports.user_views import CommonUserViews from ttt.application.user.common.ports.users import Users from ttt.entities.core.game.ai import AiType diff --git a/src/ttt/application/game/game_with_ai/wait_ai_type_to_start_game_with_ai.py b/src/ttt/application/game/game/wait_ai_type_to_start_game_with_ai.py similarity index 88% rename from src/ttt/application/game/game_with_ai/wait_ai_type_to_start_game_with_ai.py rename to src/ttt/application/game/game/wait_ai_type_to_start_game_with_ai.py index 3999812..82550fb 100644 --- a/src/ttt/application/game/game_with_ai/wait_ai_type_to_start_game_with_ai.py +++ b/src/ttt/application/game/game/wait_ai_type_to_start_game_with_ai.py @@ -1,7 +1,7 @@ from dataclasses import dataclass -from ttt.application.game.common.ports.game_views import GameViews from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews from ttt.entities.core.user.location import UserLocation diff --git a/src/ttt/application/game/game/wait_game.py b/src/ttt/application/game/game/wait_game.py index 589cffb..9d796b5 100644 --- a/src/ttt/application/game/game/wait_game.py +++ b/src/ttt/application/game/game/wait_game.py @@ -1,11 +1,11 @@ from dataclasses import dataclass from ttt.application.common.ports.transaction import Transaction -from ttt.application.game.common.ports.game_starting_queue import ( +from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_starting_queue import ( GameStartingQueue, ) -from ttt.application.game.common.ports.game_views import GameViews -from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_views import GameViews from ttt.application.user.common.ports.user_views import CommonUserViews from ttt.application.user.common.ports.users import Users from ttt.entities.core.user.location import UserLocation diff --git a/src/ttt/application/game/game_with_ai/__init__.py b/src/ttt/application/game/game_with_ai/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ttt/infrastructure/adapters/game_ai_gateway.py b/src/ttt/infrastructure/adapters/game_ai_gateway.py index e9783f5..7c30832 100644 --- a/src/ttt/infrastructure/adapters/game_ai_gateway.py +++ b/src/ttt/infrastructure/adapters/game_ai_gateway.py @@ -2,7 +2,7 @@ from typing import cast from uuid import UUID -from ttt.application.game.common.ports.game_ai_gateway import GameAiGateway +from ttt.application.game.game.ports.game_ai_gateway import GameAiGateway from ttt.entities.core.game.ai import Ai, AiType from ttt.entities.core.game.game import Game from ttt.infrastructure.openai.gemini import Gemini diff --git a/src/ttt/infrastructure/adapters/game_starting_queue.py b/src/ttt/infrastructure/adapters/game_starting_queue.py index bac1094..0333329 100644 --- a/src/ttt/infrastructure/adapters/game_starting_queue.py +++ b/src/ttt/infrastructure/adapters/game_starting_queue.py @@ -4,7 +4,7 @@ from pydantic import TypeAdapter -from ttt.application.game.common.ports.game_starting_queue import ( +from ttt.application.game.game.ports.game_starting_queue import ( GameStartingQueue, GameStartingQueuePush, ) diff --git a/src/ttt/infrastructure/adapters/games.py b/src/ttt/infrastructure/adapters/games.py index 67a9fcd..3b26914 100644 --- a/src/ttt/infrastructure/adapters/games.py +++ b/src/ttt/infrastructure/adapters/games.py @@ -3,7 +3,7 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from ttt.application.game.common.ports.games import Games +from ttt.application.game.game.ports.games import Games from ttt.entities.core.game.game import Game from ttt.infrastructure.sqlalchemy.tables import TableGame, TableUser diff --git a/src/ttt/main/aiogram/di.py b/src/ttt/main/aiogram/di.py index 9909576..ac9af53 100755 --- a/src/ttt/main/aiogram/di.py +++ b/src/ttt/main/aiogram/di.py @@ -23,15 +23,15 @@ from structlog.types import FilteringBoundLogger from ttt.application.common.ports.emojis import Emojis -from ttt.application.game.common.ports.game_views import GameViews from ttt.application.game.game.cancel_game import CancelGame from ttt.application.game.game.make_move_in_game import MakeMoveInGame +from ttt.application.game.game.ports.game_views import GameViews from ttt.application.game.game.start_game import StartGame -from ttt.application.game.game.wait_game import WaitGame -from ttt.application.game.game_with_ai.start_game_with_ai import StartGameWithAi -from ttt.application.game.game_with_ai.wait_ai_type_to_start_game_with_ai import ( # noqa: E501 +from ttt.application.game.game.start_game_with_ai import StartGameWithAi +from ttt.application.game.game.wait_ai_type_to_start_game_with_ai import ( WaitAiTypeToStartGameWithAi, ) +from ttt.application.game.game.wait_game import WaitGame from ttt.application.user.common.dto.common import PaidStarsPurchasePayment from ttt.application.user.common.ports.stars_purchase_payment_gateway import ( StarsPurchasePaymentGateway, diff --git a/src/ttt/main/common/di.py b/src/ttt/main/common/di.py index 6ece49d..08feb78 100644 --- a/src/ttt/main/common/di.py +++ b/src/ttt/main/common/di.py @@ -17,12 +17,12 @@ from ttt.application.common.ports.randoms import Randoms from ttt.application.common.ports.transaction import Transaction from ttt.application.common.ports.uuids import UUIDs -from ttt.application.game.common.ports.game_ai_gateway import GameAiGateway -from ttt.application.game.common.ports.game_starting_queue import ( +from ttt.application.game.game.ports.game_ai_gateway import GameAiGateway +from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.game_starting_queue import ( GameStartingQueue, ) -from ttt.application.game.common.ports.games import Games -from ttt.application.game.game.ports.game_log import GameLog +from ttt.application.game.game.ports.games import Games from ttt.application.user.common.ports.paid_stars_purchase_payment_inbox import ( # noqa: E501 PaidStarsPurchasePaymentInbox, ) diff --git a/src/ttt/presentation/adapters/game_views.py b/src/ttt/presentation/adapters/game_views.py index 0190ef2..2deefa9 100644 --- a/src/ttt/presentation/adapters/game_views.py +++ b/src/ttt/presentation/adapters/game_views.py @@ -4,7 +4,7 @@ from aiogram import Bot from aiogram.fsm.storage.base import BaseStorage -from ttt.application.game.common.ports.game_views import GameViews +from ttt.application.game.game.ports.game_views import GameViews from ttt.entities.core.game.game import Game from ttt.entities.core.user.location import UserGameLocation, UserLocation from ttt.infrastructure.background_tasks import BackgroundTasks diff --git a/src/ttt/presentation/aiogram/game/routes/all.py b/src/ttt/presentation/aiogram/game/routes/all.py index 7e6c213..dc45775 100644 --- a/src/ttt/presentation/aiogram/game/routes/all.py +++ b/src/ttt/presentation/aiogram/game/routes/all.py @@ -4,13 +4,13 @@ from ttt.presentation.aiogram.game.routes.game.make_move_in_game import ( make_move_in_game_router, ) -from ttt.presentation.aiogram.game.routes.game.wait_game import wait_game_router -from ttt.presentation.aiogram.game.routes.game_with_ai.start_game_with_ai import ( # noqa: E501 +from ttt.presentation.aiogram.game.routes.game.start_game_with_ai import ( start_game_with_ai_router, ) -from ttt.presentation.aiogram.game.routes.game_with_ai.wait_ai_type_to_start_game_with_ai import ( # noqa: E501 +from ttt.presentation.aiogram.game.routes.game.wait_ai_type_to_start_game_with_ai import ( # noqa: E501 wait_ai_type_to_start_game_with_ai_router, ) +from ttt.presentation.aiogram.game.routes.game.wait_game import wait_game_router game_routers = ( diff --git a/src/ttt/presentation/aiogram/game/routes/game_with_ai/start_game_with_ai.py b/src/ttt/presentation/aiogram/game/routes/game/start_game_with_ai.py similarity index 92% rename from src/ttt/presentation/aiogram/game/routes/game_with_ai/start_game_with_ai.py rename to src/ttt/presentation/aiogram/game/routes/game/start_game_with_ai.py index 8557ce0..a74cecb 100644 --- a/src/ttt/presentation/aiogram/game/routes/game_with_ai/start_game_with_ai.py +++ b/src/ttt/presentation/aiogram/game/routes/game/start_game_with_ai.py @@ -2,7 +2,7 @@ from aiogram.types import CallbackQuery, Message from dishka.integrations.aiogram import FromDishka, inject -from ttt.application.game.game_with_ai.start_game_with_ai import ( +from ttt.application.game.game.start_game_with_ai import ( StartGameWithAi, ) from ttt.entities.core.game.ai import AiType diff --git a/src/ttt/presentation/aiogram/game/routes/game_with_ai/wait_ai_type_to_start_game_with_ai.py b/src/ttt/presentation/aiogram/game/routes/game/wait_ai_type_to_start_game_with_ai.py similarity index 91% rename from src/ttt/presentation/aiogram/game/routes/game_with_ai/wait_ai_type_to_start_game_with_ai.py rename to src/ttt/presentation/aiogram/game/routes/game/wait_ai_type_to_start_game_with_ai.py index bd21465..d868302 100644 --- a/src/ttt/presentation/aiogram/game/routes/game_with_ai/wait_ai_type_to_start_game_with_ai.py +++ b/src/ttt/presentation/aiogram/game/routes/game/wait_ai_type_to_start_game_with_ai.py @@ -4,7 +4,7 @@ from aiogram.types import Message from dishka.integrations.aiogram import FromDishka, inject -from ttt.application.game.game_with_ai.wait_ai_type_to_start_game_with_ai import ( # noqa: E501 +from ttt.application.game.game.wait_ai_type_to_start_game_with_ai import ( WaitAiTypeToStartGameWithAi, ) from ttt.entities.core.user.location import UserLocation diff --git a/src/ttt/presentation/aiogram/game/routes/game_with_ai/__init__.py b/src/ttt/presentation/aiogram/game/routes/game_with_ai/__init__.py deleted file mode 100644 index e69de29..0000000