create IWantToJoinTheGameCommand

This commit is contained in:
2025-03-05 00:55:19 +01:00
parent a4e83f7357
commit 84615dec36
2 changed files with 48 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package eventDemo.app.command
import eventDemo.app.GameState
import eventDemo.app.command.command.GameCommand
import eventDemo.app.command.command.IWantToJoinTheGameCommand
import eventDemo.app.command.command.IWantToPlayCardCommand
import eventDemo.app.command.command.IamReadyToPlayCommand
import eventDemo.app.entity.Player
@@ -42,13 +43,9 @@ class GameCommandHandler(
val gameState = command.buildGameState()
when (command) {
is IWantToPlayCardCommand -> {
command.run(gameState, playerNotifier, eventStream)
}
is IamReadyToPlayCommand -> {
command.run(gameState, playerNotifier, eventStream)
}
is IWantToPlayCardCommand -> command.run(gameState, playerNotifier, eventStream)
is IamReadyToPlayCommand -> command.run(gameState, playerNotifier, eventStream)
is IWantToJoinTheGameCommand -> command.run(gameState, playerNotifier, eventStream)
}
}
}