fix initialization
This commit is contained in:
parent
8691cda9eb
commit
b7c7fd260f
@ -25,6 +25,7 @@ func NewGame() *Game {
|
|||||||
func (g *Game) StartRound() {
|
func (g *Game) StartRound() {
|
||||||
g.PP[0].StartRound()
|
g.PP[0].StartRound()
|
||||||
g.PP[1].StartRound()
|
g.PP[1].StartRound()
|
||||||
|
g.Round++
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Game) StartGroup() {
|
func (g *Game) StartGroup() {
|
||||||
@ -42,6 +43,7 @@ func (g *Game) StartGroup() {
|
|||||||
g.Shells = g.ShellArray[:shells]
|
g.Shells = g.ShellArray[:shells]
|
||||||
ShuffleSlice(&g.RNG, g.Shells)
|
ShuffleSlice(&g.RNG, g.Shells)
|
||||||
g.Group++
|
g.Group++
|
||||||
|
g.Turn = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// CurrentPlayer gets the index of the current player, either 0 or 1.
|
// CurrentPlayer gets the index of the current player, either 0 or 1.
|
||||||
|
Loading…
Reference in New Issue
Block a user