refactor: move CommandHandler to libs

This commit is contained in:
flecomte committed 2025-04-16 00:46:13 +02:00
1 parent 1f995b6ed9
commit f03265292a
7 files changed
+189 -93

No files matched your search

@@ -69,10 +69,10 @@ class GameSimulationTest :
// In the normal process, these handlers is invoque players connect to the websocket
run {
GlobalScope.launch(Dispatchers.IO) {
commandHandler.handle(player1, gameId, channelCommand1, channelNotification1)
commandHandler.handleIncomingPlayerCommands(player1, gameId, channelCommand1, channelNotification1)
}
GlobalScope.launch(Dispatchers.IO) {
commandHandler.handle(player2, gameId, channelCommand2, channelNotification2)
commandHandler.handleIncomingPlayerCommands(player2, gameId, channelCommand2, channelNotification2)
}
}
@@ -42,7 +42,7 @@ class GameCommandHandlerTest :
) { channelNotification.trySendBlocking(it) }
GlobalScope.launch {
commandHandler.handle(
commandHandler.handleIncomingPlayerCommands(
player,
gameId,
channelCommand,