Documentation ¶
Overview ¶
Package deck 包中的内容用于针对一堆内容的管理,适用但不限于牌堆、麻将牌堆等情况。
Index ¶
- type Deck
- func (slf *Deck[I]) AddGroup(group *Group[I])
- func (slf *Deck[I]) GetCount() int
- func (slf *Deck[I]) GetGroups() map[int64]*Group[I]
- func (slf *Deck[I]) GetGroupsSlice() []*Group[I]
- func (slf *Deck[I]) GetNext(guid int64) *Group[I]
- func (slf *Deck[I]) GetPrev(guid int64) *Group[I]
- func (slf *Deck[I]) RemoveGroup(guid int64)
- type Group
- func (slf *Group[I]) Fill()
- func (slf *Group[I]) GetCount() int
- func (slf *Group[I]) GetGuid() int64
- func (slf *Group[I]) GetItem(index int) I
- func (slf *Group[I]) Insert(item I)
- func (slf *Group[I]) InsertN(items []I)
- func (slf *Group[I]) IsFree() bool
- func (slf *Group[I]) Pop() (item I)
- func (slf *Group[I]) PopN(n int) (items []I)
- func (slf *Group[I]) PressOut() (item I)
- func (slf *Group[I]) PressOutN(n int) (items []I)
- func (slf *Group[I]) Pull(index int) (item I)
- func (slf *Group[I]) Push(item I)
- func (slf *Group[I]) PushN(items []I)
- func (slf *Group[I]) Thrust(index int, item I)
- type Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deck ¶
type Deck[I Item] struct { // contains filtered or unexported fields }
Deck 甲板,用于针对一堆 Group 进行管理的数据结构
func (*Deck[I]) GetGroupsSlice ¶
GetGroupsSlice 获取所有组
Click to show internal directories.
Click to hide internal directories.