Skip to content

Commit b824cda

Browse files
committed
refactor(server): small adjustments
1 parent 5d27034 commit b824cda

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/sc/server/Lobby.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Lobby: GameRoomManager(), Closeable, IClientRequestListener {
2424

2525
private fun notifyObservers(packet: ProtocolPacket) =
2626
clientManager.clients
27-
.filter { it.isAdministrator }
28-
.forEach { it.send(packet) }
27+
.filter(Client::isAdministrator)
28+
.forEach { admin -> admin.send(packet) }
2929

3030
/** Handle requests or moves of clients.
3131
* @throws RescuableClientException if something goes wrong.

server/src/main/java/sc/server/network/ClientManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ClientManager(private val requestHandler: IClientRequestListener) : Runnab
2626
/**
2727
* Adds the given `newClient` and listens to it.
2828
*
29-
* *(only used by tests and addAll())*
29+
* *(extracted from `run` for tests)*
3030
*/
3131
fun add(newClient: Client) {
3232
clients.add(newClient)

0 commit comments

Comments
 (0)