This commit is contained in:
hahwu 2025-09-11 11:04:03 +08:00
parent 0b3484a7d8
commit 6f5068802a

View File

@ -538,6 +538,9 @@ func (cb *ChessBorad) GetRetireChess(EmitType string) []int {
} }
func (cb *ChessBorad) BeginRetire(EmitType string) error { func (cb *ChessBorad) BeginRetire(EmitType string) error {
if cb.Retire == nil {
cb.Retire = make(map[string]int)
}
_, ok := cb.Retire[EmitType] _, ok := cb.Retire[EmitType]
if ok { if ok {
return errors.New("chess has been retired") return errors.New("chess has been retired")