20 lines
667 B
Go
20 lines
667 B
Go
package game
|
|
|
|
import (
|
|
"github.com/iliadenisov/galaxy/internal/controller"
|
|
"github.com/iliadenisov/galaxy/internal/model/game"
|
|
)
|
|
|
|
func PlanetProduction(configure func(*controller.Param), race string, planetNumber int, prodType, subject string) (err error) {
|
|
err = control(configure, func(c *controller.Controller) error {
|
|
return c.ExecuteCommand(func(r controller.Repo, g *game.Game) error {
|
|
return planetProduction(c, race, planetNumber, prodType, subject)
|
|
})
|
|
})
|
|
return
|
|
}
|
|
|
|
func planetProduction(c *controller.Controller, race string, planetNumber int, prodType, subject string) error {
|
|
return c.PlanetProduction(race, planetNumber, prodType, subject)
|
|
}
|