添加获取第一个可用座位号函数

This commit is contained in:
kercylan98
2023-05-12 18:00:42 +08:00
parent 915163d37d
commit b61a76ee6c
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -26,6 +26,8 @@ type RoomSeat[PlayerID comparable, P Player[PlayerID]] interface {
GetSeatInfoMapVacancy() map[int]*PlayerID
// GetSeatInfoWithPlayerIDMap 获取座位信息,将以玩家ID作为key
GetSeatInfoWithPlayerIDMap() map[PlayerID]int
// GetFirstSeat 获取第一个非空缺座位号,不存在时将返回-1
GetFirstSeat() int
// GetNextSeat 获取下一个座位号,空缺的位置将会被跳过
// - 超出范围将返回-1
// - 当没有下一个座位号时将始终返回本身