55from ttt .application .common .ports .map import Map
66from ttt .application .common .ports .transaction import Transaction
77from ttt .application .common .ports .uuids import UUIDs
8+ from ttt .application .game .common .ports .game_starting_queue import (
9+ GameStartingQueue ,
10+ )
811from ttt .application .game .common .ports .game_views import GameViews
912from ttt .application .game .common .ports .games import Games
10- from ttt .application .game .common .ports .waiting_locations import WaitingLocations
1113from ttt .application .game .game .ports .game_log import GameLog
1214from ttt .application .user .common .ports .user_views import CommonUserViews
1315from ttt .application .user .common .ports .users import Users
@@ -25,12 +27,12 @@ class StartGame:
2527 user_views : CommonUserViews
2628 games : Games
2729 game_views : GameViews
28- waiting_locations : WaitingLocations
30+ game_starting_queue : GameStartingQueue
2931 transaction : Transaction
3032 log : GameLog
3133
3234 async def __call__ (self ) -> None :
33- async for user1_location , user2_location in self .waiting_locations :
35+ async for user1_location , user2_location in self .game_starting_queue :
3436 async with self .transaction , self .emojis :
3537 user1 , user2 = await self .users .users_with_ids (
3638 (user1_location .user_id , user2_location .user_id ),
@@ -63,7 +65,7 @@ async def __call__(self) -> None:
6365 user2_location ,
6466 )
6567 if user1 is None or user2 is None :
66- await self .waiting_locations .push_many (
68+ await self .game_starting_queue .push_many (
6769 tuple (
6870 location
6971 for user , location in users_and_locations
@@ -109,7 +111,7 @@ async def __call__(self) -> None:
109111 )
110112 )
111113
112- await self .waiting_locations .push_many (
114+ await self .game_starting_queue .push_many (
113115 locations_of_users_not_in_game ,
114116 )
115117 await self .game_views .user_already_in_game_views (
0 commit comments