优化
This commit is contained in:
parent
0b3484a7d8
commit
6f5068802a
@ -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")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user