diff --git a/apps/server/src/domains/game/application/ports/gameUseCasePorts.ts b/apps/server/src/domains/game/application/ports/gameUseCasePorts.ts index 53bfee3..2bded70 100644 --- a/apps/server/src/domains/game/application/ports/gameUseCasePorts.ts +++ b/apps/server/src/domains/game/application/ports/gameUseCasePorts.ts @@ -80,8 +80,8 @@ /** 爆弾設置ユースケースが利用する爆弾状態入力ポート */ export interface BombPlacementPort { - shouldBroadcastBombPlaced(roomId: string, dedupeKey: string, nowMs: number): boolean; - issueServerBombId(roomId: string): string; + shouldBroadcastBombPlacedForRoom(roomId: string, dedupeKey: string, nowMs: number): boolean; + issueServerBombIdForRoom(roomId: string): string; } /** 爆弾設置ユースケースの入力値 */ diff --git a/apps/server/src/domains/game/application/services/GameSessionLifecycleService.ts b/apps/server/src/domains/game/application/services/GameSessionLifecycleService.ts index 0d4517a..24ba90d 100644 --- a/apps/server/src/domains/game/application/services/GameSessionLifecycleService.ts +++ b/apps/server/src/domains/game/application/services/GameSessionLifecycleService.ts @@ -28,11 +28,11 @@ return this.sessions.get(roomId)?.getPlayers() ?? []; } - public shouldBroadcastBombPlaced(roomId: string, dedupeKey: string, nowMs: number): boolean { + public shouldBroadcastBombPlacedForRoom(roomId: string, dedupeKey: string, nowMs: number): boolean { return this.sessions.get(roomId)?.shouldBroadcastBombPlaced(dedupeKey, nowMs) ?? false; } - public issueServerBombId(roomId: string): string { + public issueServerBombIdForRoom(roomId: string): string { const session = this.sessions.get(roomId); if (!session) { throw new Error(`Game session not found for roomId: ${roomId}`); diff --git a/apps/server/src/domains/game/application/useCases/placeBombUseCase.ts b/apps/server/src/domains/game/application/useCases/placeBombUseCase.ts index f3fde0e..b30790d 100644 --- a/apps/server/src/domains/game/application/useCases/placeBombUseCase.ts +++ b/apps/server/src/domains/game/application/useCases/placeBombUseCase.ts @@ -35,11 +35,11 @@ } const dedupeKey = createBombDedupeKey(input.socketId, input.payload.requestId); - if (!bombStore.shouldBroadcastBombPlaced(roomId, dedupeKey, input.nowMs)) { + if (!bombStore.shouldBroadcastBombPlacedForRoom(roomId, dedupeKey, input.nowMs)) { return; } - const bombId = bombStore.issueServerBombId(roomId); + const bombId = bombStore.issueServerBombIdForRoom(roomId); output.publishBombPlacedToOthersInRoom( roomId,