refactor: load/save state as ptr
This commit is contained in:
@@ -7,14 +7,14 @@ import (
|
||||
|
||||
func PlanetProduction(configure func(*controller.Param), race string, planetNumber int, prodType, subject string) (err error) {
|
||||
control(configure, func(c *controller.Controller) {
|
||||
c.ExecuteGame(func(r controller.Repo, g game.Game) {
|
||||
c.ExecuteGame(func(r controller.Repo, g *game.Game) {
|
||||
err = planetProduction(r, g, race, planetNumber, prodType, subject)
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func planetProduction(r controller.Repo, g game.Game, race string, planetNumber int, prodType, subject string) error {
|
||||
func planetProduction(r controller.Repo, g *game.Game, race string, planetNumber int, prodType, subject string) error {
|
||||
if err := g.PlanetProduction(race, planetNumber, prodType, subject); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user