You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
442 B
22 lines
442 B
package game |
|
|
|
import ( |
|
"strconv" |
|
"sync/atomic" |
|
"texas-poker-bk/tool/cache" |
|
) |
|
|
|
// LobbyTables 存储当前进行中的牌桌 |
|
var ( |
|
TableNo = &atomic.Int32{} // 牌桌编号计数器 |
|
LobbyTables *cache.KVCache[int32, *Table] |
|
) |
|
|
|
func init() { |
|
TableNo = &atomic.Int32{} // 牌桌编号计数器 |
|
|
|
var tableZeroValue *Table = nil |
|
LobbyTables = cache.NewKVCache(tableZeroValue, func(k int32) string { |
|
return strconv.Itoa(int(k)) |
|
}) |
|
}
|
|
|