knowyt/server/src/game/continueGame.go
2021-09-20 10:41:34 +02:00

26 lines
481 B
Go

package game
import (
"fmt"
)
func (gm *Game) ContinueGame() {
state, phase := gm.GetState()
if state != STATE_PLAY {
fmt.Printf("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:
fmt.Printf("invalid state, can't continue game in %s state, %s phase\n", state, phase)
return
}
}