16 lines
217 B
Go
16 lines
217 B
Go
package game
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func (gm *Game) FinishGame() {
|
|
state, _ := gm.GetState()
|
|
if state != STATE_PLAY {
|
|
fmt.Printf("invalid state, can't finish game in %s state\n", state)
|
|
return
|
|
}
|
|
|
|
gm.runFinal()
|
|
}
|