knowyt/server/src/game/continueGame.go

26 lines
481 B
Go
Raw Normal View History

2021-08-30 16:21:14 +00:00
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:
2021-09-06 19:23:14 +00:00
gm.revealShowCount()
case PHASE_REVEAL_SHOW_COUNT:
gm.revealSource()
2021-09-20 08:41:34 +00:00
case PHASE_REVEAL_SOURCE:
gm.nextRound()
2021-08-30 16:21:14 +00:00
default:
fmt.Printf("invalid state, can't continue game in %s state, %s phase\n", state, phase)
return
}
}