refactor: executors and routers

* refactor: executors and routers
This commit is contained in:
Ilia Denisov
2026-02-09 15:53:34 +03:00
committed by GitHub
parent e48a0c8b96
commit d9c8de27e5
38 changed files with 508 additions and 838 deletions
+6 -4
View File
@@ -129,8 +129,10 @@ func newGame() *game.Game {
}
func newCache() (*controller.Cache, *controller.Controller) {
g := newGame()
c := controller.NewCache(g)
ctl := controller.NewGameController(newGame())
// g := newGame()
// c := controller.NewCache(g)
c := ctl.Cache
assertNoError(c.CreateShipType(Race_0_idx, Race_0_Gunship, 60, 3, 30, 100, 0))
assertNoError(c.CreateShipType(Race_0_idx, Race_0_Freighter, 8, 0, 0, 2, 10))
assertNoError(c.CreateShipType(Race_0_idx, ShipType_Cruiser, Cruiser.Drive.F(), int(Cruiser.Armament), Cruiser.Weapons.F(), Cruiser.Shields.F(), Cruiser.Cargo.F()))
@@ -139,8 +141,8 @@ func newCache() (*controller.Cache, *controller.Controller) {
assertNoError(c.CreateShipType(Race_1_idx, Race_1_Freighter, 8, 0, 0, 2, 10))
assertNoError(c.CreateShipType(Race_1_idx, ShipType_Cruiser, 15, 2, 15, 15, 0)) // same name - different type (why.)
ctl := controller.NewRepoController(nil)
ctl.Cache = c
// ctl := controller.NewRepoController(nil)
// ctl.Cache = c
return c, ctl
}