knowyt/server/src/game/runRound.go

23 lines
390 B
Go
Raw Normal View History

2021-08-15 15:43:00 +00:00
package game
import (
"fmt"
)
func (gm *Game) runRound() {
2021-08-30 16:21:14 +00:00
state, _ := gm.GetState()
2021-08-15 15:43:00 +00:00
if state != STATE_IDLE && state != STATE_PLAY {
fmt.Println(fmt.Errorf("expected state \"IDLE\" | \"PLAY\" != \"%s\"", state))
return
}
err := gm.changeGameState(STATE_ANY, STATE_PLAY, PHASE_SELECT_QUOTE)
if err != nil {
fmt.Println(err)
return
}
2021-08-30 08:55:07 +00:00
gm.setupRound()
2021-08-15 15:43:00 +00:00
gm.notifyClients()
}