支持获取下一个座位号

This commit is contained in:
kercylan98
2023-05-12 11:07:41 +08:00
parent c8d701bea5
commit 0741d19b7f
2 changed files with 40 additions and 0 deletions
+8
View File
@@ -26,4 +26,12 @@ type RoomSeat[PlayerID comparable, P Player[PlayerID]] interface {
GetSeatInfoMapVacancy() map[int]*PlayerID
// GetSeatInfoWithPlayerIDMap 获取座位信息,将以玩家ID作为key
GetSeatInfoWithPlayerIDMap() map[PlayerID]int
// GetNextSeat 获取下一个座位号,空缺的位置将会被跳过
// - 超出范围将返回-1
// - 当没有下一个座位号时将始终返回本身
GetNextSeat(seat int) int
// GetNextSeatVacancy 获取下一个座位号,空缺的位置将被保留
// - 超出范围将返回-1
// - 当没有下一个座位号时将始终返回本身
GetNextSeatVacancy(seat int) int
}