2021-08-12 23:07:06 +00:00
|
|
|
package game
|
|
|
|
|
2021-08-13 20:39:37 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2021-08-12 23:07:06 +00:00
|
|
|
func (gm *Game) StartGame() {
|
2021-08-15 15:12:24 +00:00
|
|
|
// go gm.runCountdown()
|
2021-09-24 18:46:10 +00:00
|
|
|
go gm.runRound()
|
2021-08-13 20:39:37 +00:00
|
|
|
}
|
|
|
|
|
2021-08-14 11:21:53 +00:00
|
|
|
func (gm *Game) ResetGame() {
|
|
|
|
err := gm.changeGameState(STATE_ANY, STATE_IDLE, PHASE_NONE)
|
2021-08-13 20:39:37 +00:00
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
return
|
|
|
|
}
|
2021-08-30 08:55:07 +00:00
|
|
|
|
|
|
|
gm.notifyClients()
|
2021-08-12 23:07:06 +00:00
|
|
|
}
|