refactor: load/save state as ptr
This commit is contained in:
@@ -7,14 +7,14 @@ import (
|
||||
|
||||
func RenamePlanet(configure func(*controller.Param), race string, number int, name 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 = renamePlanet(r, g, race, number, name)
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func renamePlanet(r controller.Repo, g game.Game, race string, number int, name string) error {
|
||||
func renamePlanet(r controller.Repo, g *game.Game, race string, number int, name string) error {
|
||||
if err := g.RenamePlanet(race, number, name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user