knowyt/server/src/game/runFinal.go

22 lines
366 B
Go
Raw Normal View History

2021-09-21 05:57:15 +00:00
package game
import (
"fmt"
)
func (gm *Game) runFinal() {
state, _ := gm.GetState()
if state != STATE_IDLE && state != STATE_PLAY {
fmt.Println(fmt.Errorf("expected state \"IDLE\" | \"PLAY\" != \"%s\"", state))
return
}
err := gm.changeGameState(STATE_ANY, STATE_FINAL, PHASE_NONE)
if err != nil {
fmt.Println(err)
return
}
gm.notifyClients()
}