refactor: executors and routers
* refactor: executors and routers
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user