Create test for complete game
create notifications for reply the players implement notifications on GameEventPlayerNotificationListener add priority to the eventbus.subscribe() improve JWT creation update libs koin + ktor remove output of GameCommandStream improve logs create a function disableShuffleDeck to disable the shuffle of the deck (for tests)
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
package eventDemo
|
||||
|
||||
import eventDemo.app.command.command.GameCommand
|
||||
import eventDemo.app.entity.Card
|
||||
import eventDemo.app.entity.Deck
|
||||
import io.ktor.websocket.Frame
|
||||
import kotlinx.coroutines.channels.SendChannel
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
fun Deck.allCardCount(): Int = stack.size + discard.size + playersHands.values.flatten().size
|
||||
|
||||
fun Deck.allCards(): Set<Card> = stack + discard + playersHands.values.flatten()
|
||||
|
||||
suspend fun SendChannel<Frame>.send(command: GameCommand) = send(Frame.Text(Json.encodeToString(command)))
|
||||
|
||||
Reference in New Issue
Block a user