24 lines
356 B
Go
24 lines
356 B
Go
|
package main
|
||
|
|
||
|
const (
|
||
|
GameStateInProgress int = 0
|
||
|
GameStateEnded = 1
|
||
|
GameStateDraw = 2
|
||
|
GameStateAIWon = 3
|
||
|
GameStateAILost = 4
|
||
|
)
|
||
|
|
||
|
type Game struct {
|
||
|
gameFlow string
|
||
|
aiSecond bool
|
||
|
}
|
||
|
|
||
|
func newGame(gameFlow string, aiSecond bool) *Game {
|
||
|
game := &Game{
|
||
|
gameFlow: gameFlow,
|
||
|
aiSecond: aiSecond,
|
||
|
}
|
||
|
|
||
|
return game
|
||
|
}
|