feat: turn stage increment after player's command
This commit is contained in:
@@ -6,17 +6,14 @@ import (
|
||||
)
|
||||
|
||||
func JoinEqualGroups(configure func(*controller.Param), race string) (err error) {
|
||||
control(configure, func(c *controller.Controller) {
|
||||
c.ExecuteGame(func(r controller.Repo, g *game.Game) {
|
||||
err = joinEqualGroups(c, r, g, race)
|
||||
err = control(configure, func(c *controller.Controller) error {
|
||||
return c.ExecuteCommand(func(r controller.Repo, g *game.Game) error {
|
||||
return joinEqualGroups(c, race)
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func joinEqualGroups(c *controller.Controller, r controller.Repo, g *game.Game, race string) error {
|
||||
if err := c.JoinEqualGroups(race); err != nil {
|
||||
return err
|
||||
}
|
||||
return r.SaveLastState(g)
|
||||
func joinEqualGroups(c *controller.Controller, race string) error {
|
||||
return c.JoinEqualGroups(race)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user