Add Comments

This commit is contained in:
2025-03-03 21:08:21 +01:00
parent ae5c229e4b
commit de3d4a1021
18 changed files with 111 additions and 12 deletions

View File

@@ -9,13 +9,17 @@ import kotlinx.coroutines.launch
/**
* Listen [PlayCardCommand] on [GameCommandStream], check the validity and execute the action.
*
* This action produces a new [CardIsPlayedEvent]
*/
class PlayCardCommandHandler(
private val commandStream: GameCommandStream,
private val eventStream: GameEventStream,
) {
operator fun invoke() {
/**
* Init the handler
*/
fun init() {
CoroutineScope(Dispatchers.IO).launch {
commandStream.process {
// TODO check the command can be executed