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:
@@ -3,7 +3,6 @@ package eventDemo.libs.command
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
* Represent a Command stream.
|
||||
@@ -11,24 +10,6 @@ import kotlin.reflect.KClass
|
||||
* The stream contains a list of all actions yet to be executed.
|
||||
*/
|
||||
interface CommandStream<C : Command> {
|
||||
/**
|
||||
* Send a new [Command] to the queue.
|
||||
*/
|
||||
fun send(
|
||||
type: KClass<C>,
|
||||
command: C,
|
||||
)
|
||||
|
||||
/**
|
||||
* Send multiple [Command] to the queue.
|
||||
*/
|
||||
fun send(
|
||||
type: KClass<C>,
|
||||
vararg commands: C,
|
||||
) {
|
||||
commands.forEach { send(type, it) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A class to implement success/failed action.
|
||||
*/
|
||||
@@ -50,5 +31,3 @@ interface CommandStream<C : Command> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
suspend inline fun <reified C : Command> CommandStream<C>.send(vararg command: C) = send(C::class, *command)
|
||||
|
||||
Reference in New Issue
Block a user