knowyt/server/src/game/continueGame.go
2022-11-06 15:41:13 +01:00

26 lines
497 B
Go

package game
import (
"sirlab.de/go/knowyt/log"
)
func (gm *Game) ContinueGame() {
state, phase := gm.GetState()
if state != STATE_PLAY {
log.Warn("invalid state, can't continue game in %s state\n", state)
return
}
switch phase {
case PHASE_SELECT_QUOTE:
gm.revealShowCount()
case PHASE_REVEAL_SHOW_COUNT:
gm.revealSource()
case PHASE_REVEAL_SOURCE:
gm.nextRound()
default:
log.Warn("invalid state, can't continue game in %s state, %s phase\n", state, phase)
return
}
}