Create PlayerNotificationListenerTest
This commit is contained in:
@@ -59,10 +59,9 @@ private fun DefaultWebSocketServerSession.runWebSocket(
|
||||
}
|
||||
|
||||
playerNotificationListener.startListening(
|
||||
{ outgoingFrameChannel.trySendBlocking(it) },
|
||||
currentPlayer,
|
||||
gameId,
|
||||
)
|
||||
) { outgoingFrameChannel.trySendBlocking(it) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ class PlayerNotificationListener(
|
||||
private val logger = KotlinLogging.logger {}
|
||||
|
||||
fun startListening(
|
||||
outgoingNotification: (Notification) -> Unit,
|
||||
currentPlayer: Player,
|
||||
gameId: GameId,
|
||||
outgoingNotification: (Notification) -> Unit,
|
||||
) {
|
||||
projectionBus.subscribe { currentState ->
|
||||
if (currentState !is GameState) return@subscribe
|
||||
|
||||
Reference in New Issue
Block a user