wip: refactor controller

This commit is contained in:
Ilia Denisov
2026-01-14 22:17:24 +02:00
parent 1bfc9242af
commit fe8a8d4150
43 changed files with 4710 additions and 2188 deletions
+3 -3
View File
@@ -8,14 +8,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(r, g, race)
err = joinEqualGroups(c, r, g, race)
})
})
return
}
func joinEqualGroups(r controller.Repo, g *game.Game, race string) error {
if err := g.JoinEqualGroups(race); err != nil {
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.SaveState(g)