22 lines
366 B
Go
22 lines
366 B
Go
|
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()
|
||
|
}
|