Skip to content

Commit

Permalink
🚪 Using leaveGame in unregisterPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
DasLixou authored May 22, 2022
1 parent 6022582 commit 83d5c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/cc/lixou/stracciatella/game/GameManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object GameManager {
private val games: ConcurrentHashMap<KClass<out Game>, ArrayList<Game>> = ConcurrentHashMap()

fun unregisterPlayer(player: Player) {
playerGame[player]?.removePlayer(player)
leaveGame(player)
playerGame.remove(player)
}

Expand Down Expand Up @@ -59,4 +59,4 @@ object GameManager {

fun getPlayingGame(player: Player): Game? = playerGame[player]

}
}

0 comments on commit 83d5c94

Please sign in to comment.