Skip to content

Commit

Permalink
🐳
Browse files Browse the repository at this point in the history
  • Loading branch information
iohao committed May 18, 2024
1 parent dac7029 commit 2d0f2d0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ default void removePlayer(Room room, Player player) {
this.getUserRoomMap().remove(player.getUserId());
}

/**
* 将玩家从房间内内移除 并删除 userId 与 roomId 的关联
*
* @param room 房间
* @param userId userId
*/
default void removePlayer(Room room, long userId) {
room.ifPlayerExist(userId, player -> this.removePlayer(room, player));
}

/**
* 得到房间列表
*
Expand Down

0 comments on commit 2d0f2d0

Please sign in to comment.